Hi Raj,
I think u made a mistake in find pattern... i.e. you should have used \1 and not $1.
But in replace pattern we can use either \1 or $1.
$input='<it>a</it>+2<it>b</it><inf><it>cd</it></inf> <it>a</it>+2<it>b<sup>cd</sup></it>'; $input=~s!</it><(.*?)><it>(.*?)</it></\1>!<\1>$2</$1></it>!sg; print "\n$input";
Thanks,
Gopal.R
In reply to Re: using $1 as find string
by gopalr
in thread using $1 as find string
by texuser74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |