in reply to remove duplicates from an array!
When I transform your code into something I can run (it really does help us and you):
my @ICE = map { [ split /\s*\(tab\)\s*/ ] } <DATA>; my %seen; my @ICEU = grep { !$seen{$_->[0]}++ } @ICE; print Dumper \@ICE; print Dumper \%seen; __DATA__ 30F-WKS(tab)`1781183799.xxxx1' (tab) IC---; 30F-WKS (tab) `1781183799.xxx11' (tab) IC---; ADM34A3F9 (tab) `1781183799.41455' (tab) IC---;
I get
$VAR1 = [ [ '30F-WKS', '`1781183799.xxxx1\'', 'IC---; ' ], [ '30F-WKS', '`1781183799.xxx11\'', 'IC---; ' ], [ 'ADM34A3F9', '`1781183799.41455\'', 'IC---; ' ] ]; $VAR1 = { 'ADM34A3F9' => 1, '30F-WKS' => 2 };
Which looks pretty much as it should, doesn't it?
It looks like Hercynium is right. @ICE doesn't contain what you think it does
|
|---|