in reply to Re: Assigning a varable inside of (?{}) in thread Assigning a varable inside of (?{})
As Davido says, moving them to be globals (I'm presuming changing the my declaration to an our solves this in the same way), you could also wrap the regex in an eval. This will force it to be compiled fresh every time, and you'll be able to use your block scoped variables as you have them.
(edit) Hmmm, having tested this, it doesn't quite work as I expected. An eval block doesn't work, but evalling that line as a (single-quoted) string does work. Shrug.
|