my %db; foreach my $file ( @ARGV ) { print "Opening $file" if DEBUG; open ( my $fh, '<', $file ) or die "can not open $file" ; while ( my $line = <$fh> ) { chomp $line; $line =~ tr/\0375//d; next unless $line =~ /(.*?)[.-]*\t(.*)/; my ( $k, $v ) = ( $1, $2 ); $db{$k} = undef; } } print for keys %db;