Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Limit on array size?

by thelenm (Vicar)
on Nov 06, 2003 at 17:18 UTC ( #305086=note: print w/ replies, xml ) Need Help??


in reply to Limit on array size?

The possible size of an array is only limited by how much memory you have. You may be running out of memory here. Instead of creating a huge scalar and a huge array, you might try just creating the array as you read the file:

while (<ASA>) { push @ASAList, split; }

This may help enough to get the entire array into memory, but if not, you'll have to use some scheme for keeping the data on the hard disk and only reading what you need. Sounds like a good job for a tied array, maybe something in the Tie namespace on CPAN will help.

-- Mike

--
XML::Simpler does not require XML::Parser or a SAX parser. It does require File::Slurp.
-- grantm, perldoc XML::Simpler


Comment on Re: Limit on array size?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2014-09-22 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (207 votes), past polls