Perl Monk, Perl Meditation | |
PerlMonks |
Re4: Applying a RegEx in a variableby Hofmator (Curate) |
on Aug 10, 2001 at 16:37 UTC ( [id://103849]=note: print w/replies, xml ) | Need Help?? |
Well, you can always do it the qr// way (this is better anyway if you are using the same regex more than once). Or you can do it along these lines: The code executed within the eval has access to the variables outside - again it works the same way as if the evaluated code was in a code block of its own. -- Hofmator
In Section
Seekers of Perl Wisdom
|
|