in reply to How can I make a hash use less memory
But of course, to use a database is the longterm right answer, as my solution is only a dirty hack :-)while (<IN>) { my ($key, $x, $y) = split; my @from_cache = split ' ', $cache{$key}; $from_cache[0] += $x; $from_cache[1] += $y; $cache{$key} = join ' ', @from_cache; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How can I make a hash use less memory
by kevyt (Scribe) on Oct 11, 2002 at 18:39 UTC |