Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How to copy files ?

by mandog (Curate)
on Sep 08, 2003 at 05:42 UTC ( #289687=note: print w/replies, xml ) Need Help??


in reply to How to copy files ?

a quick look at  perldoc perlfunc or perldoc.com suggests that there is no built-in copy function in perl

Limbic~Region wisely suggests File::Copy which is a core module. (You won't have to install it) and nicely returns (1) on success, (0) on failure and stuffs something useful int $!

Other people tend to do stuff like:

use strict; system('cp','/path/to/file1','path/to/file2'); my $err_num=$?>>8; die "bad copy num:$err_num\n" if $err_num;


email: mandog

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://289687]
help
Chatterbox?
[chacham]: i hate it when they "update" things that work perfectly
[chacham]: and firefox updates when you look at the about window, even if autoupdate is turned off
[chacham]: thankfully ubuntu has n easy way to downgrade.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2017-08-16 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (269 votes). Check out past polls.

    Notices?