@test = grep { $X{$_}} map { defined $X{$_} or ($X{$_} += 1),$_ } @test; [download]
In reply to Re: how to remove by artist in thread Removing duplicate array elements by kumar