Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Split very big string in half

by pvaldes (Chaplain)
on Apr 15, 2015 at 19:40 UTC ( #1123550=note: print w/replies, xml ) Need Help??


in reply to Split very big string in half

Maybe you are trying to solving the wrong problem here. It seems that what you are looking for is a stream, not a string. To slurp entirely a huge file having 'tie' seems a wrong approach to me. You could run out of memory

How to do this depens on your converter. File::stream, or File::tie could be useful. The idea is to write your big file to a buffer and then feed your converter continuously in smaller chunks. (If you are using bash take a look also to xargs)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2019-10-18 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?