perl -T my %hash;while(<DATA>){ my($cord,$dist)=split; push @{$hash{$cord}},$dist;} print join "\n",map { $_."\t\t".(sort {$a <=> $b} @{$hash{$_}})[0] } sort {$a <=> $b}keys %hash __DATA__ 567 344 1345 567 2346 78 3456 67 3456 789 4678 45 5349 6 6700 124 6700 50 8964 560 567 344 1345 567 2346 78 3456 67 4678 45 5349 6 6700 50 8964 560
In reply to Re: Repeats exclusion
by suhailck
in thread Repeats exclusion
by Grig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |