in reply to extracting only those keys with uniq values in array list
#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11131485 use warnings; @ARGV = 'd.11131485'; # FIXME used for testing my %seen; while( <> ) { my ($r_name, $seq) = (split /\t/)[0, 9]; $seq =~ s/.{20}\K.*//; $seen{"$r_name\t$seq"}++ and print "$r_name\n"; }
Works with the data file I had to fake up because you did not provide a sample data file.
|
|---|