note
sauoq
<p>It seems you have inadvertently created a closure.</p>
<p>If you use <tt>local $ret = '';</tt> in that sub, things should work.</p>
<p>Note, however, that by "work" I don't mean that it will return "1.1.1.1.1." It will only return 1 <em>when the <tt>^(a)</tt> portion of the regex matches.</em> That's because, if it doesn't match, the regex engine returns right away and never gets to your code assertion.</p>
<pre>
-sauoq
"My two cents aren't worth a dime.";
</pre>
267270
267270