On 5/15/07, yitzle <[EMAIL PROTECTED]> wrote:
snip
You can split the input file into chunks, or process one ID and then
let the variable go out of scope or whatever...
snip
Or, since the solution involves hashes, you could use a dbm file tie'd
to a hash to keep the data on disk instead of RAM.
Hashes!
Untested code:
while(<>){
chomp;
($id,$name)=split(/\|/,$_);
push( @($hash{$id}, $name) );
}
You can split the input file into chunks, or process one ID and then
let the variable go out of scope or whatever...
chomp;
($id,$name)=split(/\|/,$_);
$previous_id=$id;