Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Is there any way to put regex modifiers into a variable?

by LanX (Saint)
on Mar 11, 2018 at 18:56 UTC ( [id://1210677]=note: print w/replies, xml ) Need Help??


in reply to Is there any way to put regex modifiers into a variable?

Modifiers decide how the regex is compiled, so it must happen at compile time. *

Though putting it inside an eval string ( not block!) should work.

What did you try?

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery

*) I think I was wrong.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-29 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found