in reply to Re: Unusual Closure Behaviour
in thread Unusual Closure Behaviour
Hi I think this clarifies the situation. $x is definitely lexically scoped. Run this as in then uncomment the use strict.
cheers# use strict; sub foo { my $x if 0; return ++$x; } for (1..7){ print foo(); print "($x)"; };
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
---|
In Section
Seekers of Perl Wisdom