We don't bite newbies here... much | |
PerlMonks |
Re: Scoping issues with code evaluation asserstions?by sauoq (Abbot) |
on Jun 19, 2003 at 17:05 UTC ( [id://267276]=note: print w/replies, xml ) | Need Help?? |
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.";
In Section
Seekers of Perl Wisdom
|
|