Tag Archives: uniq

Perl Tip Of The Day: “uniq” an Array

I can across a great snippet of code, posted on DZone, that provides a two line solution to uniq an array while maintaining order: # Input: @list # Output: @uniqed   my %seen; my @uniqed = grep !$seen{$_}++, @list; #From … Continue reading

Posted in Software Development | Tagged , , | Leave a comment