We don't bite newbies here... much | |
PerlMonks |
Re: Is there any way to put regex modifiers into a variable?by Discipulus (Canon) |
on Mar 11, 2018 at 19:45 UTC ( [id://1210680]=note: print w/replies, xml ) | Need Help?? |
Hello, for sure davies's answer is wiser but maybe you are interested to know that also the feared eval string can accomplish the taske:
PS infact eval is powerful but dangerous: consider at least to check what was passed in following the good principle never trust user input that can be also read as never trust user or just never trust ;=)
L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|