Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: How to split big files with Perl ?

by Anonymous Monk
on Dec 26, 2014 at 21:41 UTC ( [id://1111434]=note: print w/replies, xml ) Need Help??


in reply to Re^3: How to split big files with Perl ?
in thread How to split big files with Perl ?

I see you've updated your original node, but haven't marked it as updated. Please don't do that since now some of the replies don't make sense anymore, see here.

This is still not correct: my $split_fh = $fh . 'split'; #creates 'filename.split' - don't use $fh, the filehandle, use a variable containing the filename here. Also print $out_file, $buf; - remove the comma.

Reading the file one byte at a time is a slightly better approach than 2GB at a time, but probably still not very efficient - a buffer size of at least a few kilobytes will probably get you better performance.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-19 05:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found