Welcome to the Monastery | |
PerlMonks |
Re: Re: Re: Unusual Closure Behaviourby iakobski (Pilgrim) |
on Jul 12, 2001 at 19:54 UTC ( [id://96081]=note: print w/replies, xml ) | Need Help?? |
HyperZonk and Synapse0 have both suggested that the my is being ignored and all that is happenning is that $x is simply global.
It's a good theory, and certainly what I thought when I first looked at it. But it's easy to see that this isn't true: try comparing with
I reckon the real reason is the explanation given by Abigail. Now I don't think I would ever write my $x if 0 unless I wanted to get the sack for writing obscure code, but how about: would that be difficult to understand? Would it carry on working in the future? -- iakobski
In Section
Seekers of Perl Wisdom
|
|