ademmler,
Firstly, these are not URLs the are paths to files.
Secondly, are you sure you have permissions to read from/write to the source file and target directory? Please show us the code you are actually using, and how you are calling it. Have you tried quoting the parameters you are passing to the copy command?
#!/usr/bin/perl
use strict;
use warnings;
use File::Copy;
my $source = $ARGV[0];
my $target = $ARGV[1];
copy("$source", "$target") or die "Can't copy files ($!)\n"
Update: Fixed typo, reworded last sentence.
Hope this helps
Martin | [reply] [d/l] |
eh? "$source" creates a string that's a copy of $source. Why would you do that? Not only does @ARGV contain strings, this will happen implicitly if copy requires them to be strings.
| [reply] [d/l] [select] |
Hi - thank you all again.
#Firstly, these are not URLs the are paths to files.
Yeah you are right -sorry for using the wrong wording.
#Secondly, are you sure you have permissions to read from/write to the source file and target directory?
Yes I am, I can copy them from the shell . . .
#Please show us the code you are actually using, and how you are calling it. Sorry, I cant - It is one line within a complete project with Database, daemons, WebGUIs etc. . . to big, therefore I have provided the stripped down sample file.
#Have you tried quoting the parameters you are passing to the copy command?
Yes - without succsess . . .
Seems like there is a difference in my File::Copy from Perl 5.8.6 and the one from perl 5.10 We are just checking this . . .
Regards Alex
| [reply] |