mork

Untitled

May 2nd, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.31 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #
  3. my %hash;
  4. open(INPUT, 'Fh_Sm.temp');
  5. while (my $linea = <INPUT>) {
  6.     chomp $linea;
  7.     my ($primero, $segundo) = split '\t',$linea;
  8.     my $key = "$primero $segundo";
  9.     next if exists $hash{$key};
  10.     $hash{$key} = $linea;
  11. }
  12. close(INPUT);
  13.  
  14. while (my ($key, $val) = each %hash) {
  15.     print "$val\n";
  16. }
Advertisement
Add Comment
Please, Sign In to add comment