|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re: Explain the codeby gopalr (Priest) |
| on Jul 24, 2008 at 12:54 UTC ( #699861=note: print w/ replies, xml ) | Need Help?? |
|
This approach is merges the construction of the %seen hash with the extraction of unique elements. 1. reading elements from @array 2. If the current element ($_) and it is not in the hash (%seen), it will push into @result. Then it stored into hash(%seen). As we know hash will not allow duplicate value Thanks Gopal
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||