Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Can't copy file

by redgreen (Priest)
on Mar 30, 2015 at 20:22 UTC ( #1121896=note: print w/replies, xml ) Need Help??


in reply to Can't copy file

use strict;
use warnings;

close FH; This file handle hasn't been opened.

$outfh is never closed. Make sure you close after you are done writing.

Which is probably why the copy fails, the file is still open...

Also, check to make sure the copy was successful:

if ( ! copy($oldlocation, $newlocation) ) { print "Copy failed: $!\n"; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2021-06-25 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (134 votes). Check out past polls.

    Notices?