Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^5: Lexical closures

by backstab (Novice)
on Oct 25, 2008 at 20:45 UTC ( #719552=note: print w/replies, xml ) Need Help??

in reply to Re^4: Lexical closures
in thread Lexical closures

I admit in day-to-day scripts always wanting the foreach element placeholder to be local (in the general sense) to the loop so that having it my'd as far is mandatory as chromatic showed us in the other post.

But, we can imagine some uses in special cases as debugging, introspection or understanding dead code...

I did a quick grep on the perl files I have installed for foreach that seems to use a global "$i". I've only found one, maybe, from

It might be an interessing read.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2020-10-28 04:48 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (259 votes). Check out past polls.