in reply to Re: What does !$saw{$_}++ means
in thread What does !$saw{$_}++ means
but there also is the non-looped version:
Except that x is a loop operator, just like map. In fact, it not only loops for the number of duplications, it also implicitely loops over each element of the list on the LHS.
@saw{@in} and keys(%saw) are also loops, but they are implicit unlike x.
In fact, you can remove two of the four loops of your "non-looped version":
undef %saw; undef(@saw{@in}); @out = keys(%saw);
Update: undef %saw is also an implicit loop, on calls other than the first.
|
---|