If you could post your code, that would help. You can also check out File::Copy.
use File::Copy;
move $old_loc, $new_loc or die "Cannot move $old_loc to $new_loc: $!";
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats. | [reply] [d/l] |
Could you tell us your operating system and environment (are you calling Perl from a command prompt or from a web server)? | [reply] |
Yes, please post a snippet and what OS you're on. If you're moving from one filesystem to another, rename
may fail. rename is very OS (well filesystem) intrinsic. Are you checking the return value of rename?
rename "/foo/bar.txt", "/bar/foo.txt" or
die "could not rename $!\n";
-derby | [reply] [d/l] |
Sorry for the delay, I used the unlink command.
It appears to be working fine. I had written the script to reference the file, move it, then encrypt it. I changed this, being that I already have the data from the file, I just create the file in the new location and feed it the encrypted data. On success, unlink the file. Thanks
| [reply] |