Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Assigning a varable inside of (?{})

by Jasper (Chaplain)
on May 03, 2006 at 16:43 UTC ( #547205=note: print w/ replies, xml ) Need Help??


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.


Comment on Re^2: Assigning a varable inside of (?{})
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://547205]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2014-12-23 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (133 votes), past polls