in reply to Re: Duplicate entries?
in thread Duplicate entries?

this subroutine will sort the list of genes if you have put them into an array where each gene (or line containing the gene) is an element of the array and where each duplicated entry is of the same format.
sub findDupsInArray { my @array =(@_); @array = sort{$a cmp $b} @array; my $previtem; foreach my $item (@array){ if($item ne $previtem ) { push (@dups,$previtem); }#if $previtem = $item; }#foreach return @dups; }
Alternatively you can make the whole list a hash where gene name is the key and gene description is the value. then export the hash since the hash will not allow duplicated keys.