copy( $oldlocation, $newlocation ) or die "Copy failed: $!";
Tip #1 from the Basic debugging checklist: warnings. You try to close FH, but you opened $outfh.
Do not close the file in the foreach loop. It works as expected for me when I close it outside the loop.
In reply to Re: Can't copy file
by toolic
in thread Can't copy file
by novice2015
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |