Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 ;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://741942]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-06-16 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.