if i understand correctly, you can do it with an intermediate hash and grep.
as for whether you consider grep "having to loop" or not, well, it's a lot less loopy than sorting keys...my %seen; my @nodupes = grep { not $seen{$_}++ } @mayhavedupes;
|
---|
In Section
Seekers of Perl Wisdom