in reply to Re: Duplicate entries?
in thread Duplicate entries?
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.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; }
|
|---|