Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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'}));

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]
[Discipulus]: good morning monks! town holiday here.. but super busy
Discipulus time is not comarable with money.. when you have a roof and something to eat
[Corion]: Hi Discipulus! Busy making the town better? ;)
[Discipulus]: the house I hope.. now i'm going on the roof putting some protection for the sun. afternoon 150 km for a water polo training (son, obviously..)
[Corion]: Discipulus: Ah - lazy roof-sitting ;)
[Corion]: (well, after you've put on the sun protection ;) )
[Corion]: But I should be moving into town as well, do some chores and get my hair cut...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2017-06-29 08:39 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (655 votes). Check out past polls.