in reply to Explain the code
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Explain the code
by olus (Curate) on Jul 24, 2008 at 12:58 UTC | |
by gopalr (Priest) on Jul 24, 2008 at 13:08 UTC | |
by olus (Curate) on Jul 24, 2008 at 13:12 UTC | |
by moritz (Cardinal) on Jul 24, 2008 at 13:09 UTC | |
by FunkyMonk (Chancellor) on Jul 24, 2008 at 13:11 UTC |
In Section
Seekers of Perl Wisdom