Welcome to the Monastery | |
PerlMonks |
Re: use of constants in regex substitutions?by dmitri (Priest) |
on Sep 22, 2003 at 23:33 UTC ( [id://293327]=note: print w/replies, xml ) | Need Help?? |
You can treat constants as subroutines (which they are). In your case, the statement should look something like this:
Note the 'e' quantifier after the regex -- this tells the engine to evaluate the substitute before the substitution. Update: this code is incorrect, thanks to 3dan for pointing this out.
In Section
Seekers of Perl Wisdom
|
|