in reply to Re: copy files to the nonpermanent directory
in thread copy files to the nonpermanent directory

The error message is: Unsuccessful stat on filename containing newline at C:/Perl/lib/File/Copy.pm lin e 91, <> line 2. Cannot copy file: No such file or directory. But I'm sure that the directory exists, the strings that I'm puting into $dir1 are from input, but if I'll write the same thing but without scalars, for example: my $dir1="c:\\perl\\begperl\\qa"; error message is: Cannot copy file: Bad file descriptor. Thank you very much for your response!!!!!!!!
  • Comment on Re: Re: copy files to the nonpermanent directory

Replies are listed 'Best First'.
Re: Re: Re: copy files to the nonpermanent directory
by ColtsFoot (Chaplain) on Mar 24, 2004 at 11:34 UTC
    As the values that you are using to build your path are coming
    from a user, I would suggest that they still contain the newline character
    you will need to remove this
    chomp($path); chomp($file); $dir1 = join('\\', 'c:', $path, $file);
    Letting us see a snippet of your code will make solving your problems MUCH easier