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;
Dear all,
I want to transform one2many like table to one2one table. Original table
looks as follows:
1|Michael
1|Alex
1|Bob
1|Pete
2|Bob
2|Andre
2|David
2|Alex
3|Pete
and the output should be similar to;
1|Michael Alex Bob Pete
2|Bob Andre David Alex
3|Pete
Table is large (4 GB), so I think t