use warnings; use strict; open(my $COORD, "<", "coordinate.txt") or die("Couldn't read coordinate file - $!"); open(my $DIST, "<", "dist.txt") or die("Couldn't read distance file - $!"); my %coord; until (eof $COORD) { my $c = (split " ", scalar <$COORD>)[0]; my $d = (split " ", scalar <$DIST>)[0]; my $p = $coord{$c}; $coord{$c} = $d if !defined($p) || $d < $p; } close($COORD); close($DIST); print "$_\t$coord{$_}\n" for sort { $a <=> $b } keys %coord;
In reply to Re: Repeats exclusion
by repellent
in thread Repeats exclusion
by Grig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |