Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Split very big string in half

by pvaldes (Chaplain)
on Apr 15, 2015 at 19:40 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1123550]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-23 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found