http://www.perlmonks.org?node_id=267377


in reply to Scoping issues with code evaluation asserstions?

from my understanding: variables in code sections of regexes only have scope within the regex and dissappear thereafter. The camel book was mentions of a way to pass values of code regex variables out of the regex. can't remember how off the top of my head. i think the "ret" should be declared as local inside the regex. check in the camel book. beats the hell out of me why you would get a "1" result though. good luck.