Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Think about Loose Coupling
 
PerlMonks  

Re: Re4: Applying a RegEx in a variable

by George_Sherston (Vicar)
on Aug 10, 2001 at 15:16 UTC ( [id://103901]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re4: Applying a RegEx in a variable
in thread Applying a RegEx in a variable

Hmm. I agree. It really would be mad to proliferate if / else statements to deal with all the different permutations of modifiers!

Also agree with what you said earlier - eval is the way to go, but only if you don't need the dynamically scoped variables.

I wonder if future perl releases will allow variables as modifiers -
$modifier = 'i' # or anything else $string =~ /$regex/$modifier;
- that would make this problem (and others like it?) a lot easier.

§ George Sherston

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://103901]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.