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

Re: Out of memory

by fishmonger (Chaplain)
on Jan 15, 2015 at 15:23 UTC ( [id://1113345]=note: print w/replies, xml ) Need Help??


in reply to Out of memory

How big is Data2014.txt?

I doubt that the out of memory problem is due to slurping that file into an array instead of looping over it line-by-line.

I suspect that the out of memory issue is related to the retrieval of the url/file. Instead of copying the content into one or more vars, I'd output it directly to the file.

EDIT:
The LWP::Simple module has a getstore() function that will simplify that process.

Replies are listed 'Best First'.
Re^2: Out of memory
by wrkrbeee (Scribe) on Jan 15, 2015 at 15:28 UTC
    Size of Data2014.txt is 1.5 MB, so you are probably correct. Any tips for the output directly to the file? Thank you!
        Thank you!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-23 19:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found