Hi beginr,
I can see that this is your first post, Welcome to the Monastery! Make yourself at home., Please read Perl monks Faqs and do Super Search before posting.
@newarray = grep (!$unique{$_}++, @array); print @newarray;
There are some modules as well List::Unique, List::Uniq etc.
Prasad
In reply to Re: finding the distinct elements in an array
by prasadbabu
in thread finding the distinct elements in an array
by beginr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |