in reply to Re: Scoping issues with code evaluation asserstions?
in thread Scoping issues with code evaluation asserstions?
That was my first thought, but it didn't make much sense to me. Maybe my understanding of scoping isn't quite as good as I thought, but I thought that you had to declare a variable outside of the scope of the sub in order to create a closure.
Could it be that the one-time compilation of the regex somehow causes the closure?
Also, saying local $ret = ''; breaks under strict:
Variable "$ret" is not imported at /home/apirkle/bin/retest.pl line 8. Global symbol "$ret" requires explicit package name at /home/apirkle/b +in/retest.pl line 6. Global symbol "$ret" requires explicit package name at /home/apirkle/b +in/retest.pl line 8.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Scoping issues with code evaluation asserstions?
by diotalevi (Canon) on Jun 19, 2003 at 19:08 UTC | |
Re: Re: Re: Scoping issues with code evaluation asserstions?
by sauoq (Abbot) on Jun 19, 2003 at 19:11 UTC | |
by diotalevi (Canon) on Jun 19, 2003 at 19:17 UTC | |
by sauoq (Abbot) on Jun 19, 2003 at 19:34 UTC |
In Section
Seekers of Perl Wisdom