|Keep It Simple, Stupid|
interpolation in replacement partby anniyan (Monk)
|on Oct 14, 2005 at 15:49 UTC||Need Help??|
anniyan has asked for the
wisdom of the Perl Monks concerning the following question:
hello monks, i have come up with a problem where i could not able to search anywhere.
i have hash in which key and value are patterns.
when i used this above hash in the regular expression it matches in the matching but in the replacement part, the interpolation is not taking place.
So i need your help, i also tried using 'e' option modifiers twice to evaluate twice, but didnt got.
I tried with following code,
For the string, <date>Jan, 10 1997</date>, when i used $1 separately in replacement part it works fine, where i get <month>Jan</month>, but when i used hash it is not getting interpolated.
Please find where i am going wrong.