Perl: the Markov chain saw | |
PerlMonks |
Re: /ee regex modifierby chipmunk (Parson) |
on Nov 14, 2001 at 08:38 UTC ( [id://125244]=note: print w/replies, xml ) | Need Help?? |
If /e interpolated variables in the replacement, then a substitution like the following would not work:
s/(\d+)/$x = $1/e;
/e treats the replacement string like eval BLOCK. It's compiled at script compile-time, and variables are not interpolated.
In Section
Seekers of Perl Wisdom
|
|