Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Evaluating $1 construct in literal replacement expression

by gone2015 (Deacon)
on Feb 06, 2009 at 16:22 UTC ( [id://741942] : note . print w/replies, xml ) Need Help??


in reply to Evaluating $1 construct in literal replacement expression

How about:

my $s ; s/$search/$subst/g and $s = $1 and s/\$1/$s/g ;