OUTPUT:sub util_remove_duplicates{ my $ref=shift; my %hash; @$ref=grep{!$hash{$_}++} @$ref; } my @array=qw(a b c a j k l m o p q k); print "@array\n"; util_remove_duplicates(\@array); print "@array\n";
a b c a j k l m o p q k a b c j k l m o p q
In reply to Re: Removing Duplicates from Array Passed by Reference
by fletcher_the_dog
in thread Removing Duplicates from Array Passed by Reference
by arunhorne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |