Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: File::Copy versus cp/mv

by Abigail-II (Bishop)
on Oct 01, 2003 at 15:59 UTC ( [id://295663]=note: print w/replies, xml ) Need Help??


in reply to File::Copy versus cp/mv

"Portability" between platforms is the strongest argument in favour of File::Copy. "Portability" on the same platform (as in "behave the same as other applications do") is a strong argument in favour of using cp.

Personally, I favour 'rename' for renaming files within the same filesystem, 'system mv' for moving files over filesystem boundaries, and 'system cp' for copying files. My main beef I have against File::Copy is that it doesn't it doesn't respect execution bits. Furthermore, 'cp' (and 'mv') can take multiple arguments (moving or copying a bunch of files into a directory), and options (-a, -f, -R). Oh, and the last argument of 'cp' can be a directory, which I find extremely useful. Perhaps File::Copy::copy can too, but not according to its manual page.

On a more abstract level, why are you trying to convince your coworkers to stop using system? You can't even come up with reasons they should - you are asking here for arguments in your favour! If you can't find convincing arguments yourself, it may be a sign you are not fighthing a worthwhile battle.

Abigail

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found