|
|
| Do you know where your variables are? | |
| PerlMonks |
Re: Detecting if a string is a regular expressionby LanX (Monsignor) |
| on Jan 10, 2013 at 19:58 UTC ( #1012731=note: print w/ replies, xml ) | Need Help?? |
|
> Is there some quick and dirty way to detect is a string is a pure string, or if it is a regular expression. no, IMHO any $string can be used as a valid regex like in m/$string/ w/o syntax error. but if you need a regex datatype to distinguish $scalars use qr// to generate them.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||