Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Can't copy file

by toolic (Bishop)
on Mar 30, 2015 at 20:17 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 01:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found