Problems? Is your data what you think it is? | |
PerlMonks |
Re: Applying a RegEx in a variableby abstracts (Hermit) |
on Aug 10, 2001 at 13:51 UTC ( [id://103816]=note: print w/replies, xml ) | Need Help?? |
Hello Try reading in perlop about the qr operator. Here is an example about how it can be used: Hope this helps,,, Aziz,,, Update: Yes, you got the right idea there using $re = eval "qr$regexp_val";Make sure you trust the source of your regexp before feeding it to eval.
In Section
Seekers of Perl Wisdom
|
|