in reply to Removing redundancy
--Davemy @order = (); my %values; while (<IN>) { my ($col1, $col2) = split; push @order, $col1 unless exists $values{$col1}; push @{$values{$col1}}, $col2 } # and now print it: foreach my $col1 (@order) { { print join("\t", $col1, @{$values{$col1}}), "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Removing redundancy
by dr_jgbn (Beadle) on Apr 30, 2003 at 03:37 UTC |