in reply to Re: substitution interpolation?
in thread substitution interpolation?
First off it's wrong to use qr// on rhs of s///
You must realize that the left side of s/// is the regular expression, and that the right side is merely the the substitute string ( or that which produces the substitute string)
So in effect what you are doing is:
This is why you end up with the string (?-xism: spooge), which is the scalar value of $sub
In the node you referred to, they eval'ed the rhs one way or the other. mdillon eval'ed the rhs only ( $1 . "ar" ) by using /ee ( read perlop ), and knight eval'ed the entire perl expression ( "s/$lhs/$rhs/" ).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: substitution interpolation?
by h0mee (Acolyte) on May 31, 2001 at 06:43 UTC | |
by lestrrat (Deacon) on May 31, 2001 at 06:47 UTC |