We have sort and uniq so it's a matter of combining them:
use List::MoreUtils qw/uniq/; my @a = qw/4 6 8 9 3 1 5 8 9 0 0 2 5 7 9 4 2 5 5 4 7 9 6 4 2/; my @s = uniq sort @a; print "s: @s\n"; __END__ s: 0 1 2 3 4 5 6 7 8 9
--
David Serrano
In reply to Re: 'sort -u' in perl
by Hue-Bond
in thread 'sort -u' in perl
by sanPerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |