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 reply to Re: Explain the code
by gopalr
in thread Explain the code
by rose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |