my %freq = ();
my @unique = grep { !$freq{$_}++ } @arr;
You may be interested in List::MoreUtils::uniq:
use List::MoreUtils qw(uniq);
my @unique = uniq @arr;
Give a man a fish: <%-(-(-(-<
In reply to Re^8: Remove similar key=value pair from HOH
by AnomalousMonk
in thread Remove similar key=value pair from HOH
by vaibhav07
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |