Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
more useful options
 
PerlMonks  

Re^3: help needed in File::copy

by izut (Chaplain)
on Mar 01, 2006 at 07:51 UTC ( [id://533638]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: help needed in File::copy
in thread help needed in File::copy

copy will check if the destination file exists. I don't think exists a parameter for overwrite destination file. Maybe you want this:

unlink $destfile if -f $destfile; copy($origfile, $destfile);

Update: This is a workaround. As mickeyn said at Re: help needed in File::copy, File::Copy should overwrite destination file.

Igor 'izut' Sutton
your code, your rules.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://533638]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.