Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: What does !$saw{$_}++ means

by ikegami (Patriarch)
on Jan 26, 2005 at 17:06 UTC ( [id://425285]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://425285]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found