shaezi has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, I am attempting to work with a hash, but the amount of data that I'm loading into it is causing an out of memory error. The data is over 800mb.
I tried using tie, like:
I tried using tie, like:
First of all I want to know if this is a good approach or not. Second, for the values of each key I'm referencing an array. When I try to get a value for example: $data_parsed{$hashkey}[$i]I get an error message like:Can't use string ("ARRAY(0x200e1dfc)") as an ARRAY ref while "strict refs" in use. So I was wondering what I was doing wrong. Any help would be appreciated. Thanks!use GDBM_File; my %data_parsed; tie %data_parsed, "GDBM_File", "$hashfil", O_RDWR|O_CREAT, 0666;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Loading large amount of data in a hash
by maverick (Curate) on May 01, 2002 at 22:22 UTC | |
Re: Loading large amount of data in a hash
by strat (Canon) on May 01, 2002 at 23:16 UTC | |
Re: Loading large amount of data in a hash
by perrin (Chancellor) on May 01, 2002 at 23:00 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Back to
Seekers of Perl Wisdom