wrote in news:1133869308.010095.175370
@f14g2000cwb.googlegroups.com:
> Hi,
>
> I want to replace a string with perl variable which has the
> text \${IMAGEPATH}. I gave as follows. but it is not working. Can
> anybody help me?
>
> The code is
>
> $replace='\${IMAGEPATH}';
> $string="http://image.com";
>
> $string=~ s/$find/$replace/g;
Characters like $ and { are special within regexes. If you want to replace
the literal string, you need to quote-escape it:
$string =~ s/\Q$find/$replace/g;
--
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`