Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: file copy

by sh1tn (Priest)
on Nov 28, 2007 at 14:28 UTC ( #653539=note: print w/ replies, xml ) Need Help??

in reply to file copy

If the source file is small you can use File::Slurp

use File::Slurp; my $file_src = shift; my $file_dst = shift; write_file($file_dst, {'binmode' => ':raw'}, read_file($file_src, {'bi +nmode' => ':raw'}));

Comment on Re: file copy
Download Code
Replies are listed 'Best First'.
Re^2: file copy
by tirwhan (Abbot) on Nov 28, 2007 at 15:33 UTC

    Umm, what would be the point of that? File::Slurp

    • is not in core and will only work with Perl version 5.005+
    • seems to have issues with Unicode files as well as several unadressed bug reports
    • does not help with any platform issues
    • usage is just plain unintuitive for a maintenance programmer in this case

    I'm not trying to knock File::Slurp, it's probably good at what it does (though the numerous, long-running bug reports would give me pause), but what possible reason (other than obfuscation) would you have for using it in this case?

    All dogma is stupid.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-11-27 13:37 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (729 votes), past polls