|
|
| P is for Practical | |
| PerlMonks |
Re: Turning an argument into a regexpby le (Friar) |
| on Aug 30, 2000 at 18:04 UTC ( [id://30361]=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.
I don't think the File::Find module has problems with a
variable being a regexp. But you should let Perl know that
you actually mean a regexp. In your example, $regex is treated
as a scalar, not as a regex. Try something like this:
Putting the regex delimiters into the variable may work with an eval, but this is just a wild guess.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||