Jman1 has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use warnings; my %hash = (); foreach my $a (1..500) { foreach my $b (1..4000) { foreach my $c (1..10) { foreach my $d (1..7) { $hash{$a}{$b}{$c}{$d} = $d; } } } } print "here\n";
That program dies without reaching the print statement. I'm running Windows XP.
What's my best solution here? Obviously I could write everything to disk somehow, but that seems like it would be pretty slow, especially since I'll need to access it a lot to do computations. Do I need a database? Help! :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: My data structure needs too much memory!
by Roy Johnson (Monsignor) on Dec 13, 2005 at 16:55 UTC | |
by Jman1 (Acolyte) on Dec 13, 2005 at 17:02 UTC | |
by thundergnat (Deacon) on Dec 13, 2005 at 17:21 UTC | |
by Anonymous Monk on Dec 13, 2005 at 18:17 UTC | |
by Roy Johnson (Monsignor) on Dec 13, 2005 at 17:21 UTC | |
by graff (Chancellor) on Dec 14, 2005 at 04:58 UTC | |
|
Re: My data structure needs too much memory!
by pileofrogs (Priest) on Dec 13, 2005 at 17:12 UTC | |
|
Re: My data structure needs too much memory!
by dave_the_m (Monsignor) on Dec 13, 2005 at 18:48 UTC | |
|
Re: My data structure needs too much memory!
by artist (Parson) on Dec 13, 2005 at 17:25 UTC |