Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: (tye)Re2: A Real Closure

by diotalevi (Canon)
on Jun 03, 2003 at 19:45 UTC ( #262762=note: print w/replies, xml ) Need Help??


in reply to Re: (tye)Re2: A Real Closure
in thread Unusual Closure Behaviour

I've also used that behaviour to get less-global shared variables. I was working around an even uglier problem and this isn't the sort of thing I'd recommend for general usage but it is another useful usage.

{ my $x=0; sub foo { $x } sub bar { $x } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://262762]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2017-09-21 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (241 votes). Check out past polls.

    Notices?