There's more than one way to do things | |
PerlMonks |
Re: Re: (tye)Re2: A Real Closureby diotalevi (Canon) |
on Jun 03, 2003 at 19:45 UTC ( [id://262762]=note: print w/replies, xml ) | Need Help?? |
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 } }
In Section
Seekers of Perl Wisdom
|
|