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";
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