Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Can't copy file

by toolic (Bishop)
on Mar 30, 2015 at 20:17 UTC ( #1121895=note: print w/replies, xml ) Need Help??


in reply to Can't copy file

Check if copy succeeded (File::Copy):
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1121895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2022-01-16 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (49 votes). Check out past polls.

    Notices?