Are you using File::Copy? If so, change the copy statement to
copy("$dir/$file","$dir1/$file") or die "Cannot copy file: $!\n";
What error message does this generate?
Arjen
Comment on Re: 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!!!!!!!!
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