Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: File::Copy or system

by pvaldes (Hermit)
on Sep 28, 2011 at 22:23 UTC ( #928439=note: print w/ replies, xml ) Need Help??


in reply to File::Copy or system

In a pure unix environment, is File::Copy::copy($a,$b) preferred to system('cp',$a,$b)?

If what you want is to copy several files to a directory probably not, i.e:

use File::Basename; use File::Copy; use Carp; open my $a, 'myfile.txt'; my ($f,$b,$c) = $fileparse("/home/me/my_dir/my_other_file.txt"); copy($a,$b) or croak; # Oops!


Comment on Re: File::Copy or system
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-04-19 22:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls