in reply to Scoping issues with code evaluation asserstions?
It seems you have inadvertently created a closure.
If you use local $ret = ''; in that sub, things should work.
Note, however, that by "work" I don't mean that it will return "1.1.1.1.1." It will only return 1 when the ^(a) portion of the regex matches. That's because, if it doesn't match, the regex engine returns right away and never gets to your code assertion.
-sauoq "My two cents aren't worth a dime.";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Scoping issues with code evaluation asserstions?
by Cirollo (Friar) on Jun 19, 2003 at 18:56 UTC | |
by diotalevi (Canon) on Jun 19, 2003 at 19:08 UTC | |
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