Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Evaluating $1 construct in literal replacement expression

by Anonymous Monk
on Feb 06, 2009 at 11:57 UTC ( [id://741881]=note: print w/replies, xml ) Need Help??


in reply to Evaluating $1 construct in literal replacement expression

You may find one of these useful s/$search/na $1/g; s/$search/sprintf '%s',"na $1"/ge;
  • Comment on Re: Evaluating $1 construct in literal replacement expression

Replies are listed 'Best First'.
Re^2: Evaluating $1 construct in literal replacement expression
by Anonymous Monk on Feb 06, 2009 at 11:58 UTC
    So much for previews !

    #s/$search/na $1/g;

    s/$search/sprintf '%s',"na $1"/ge;

      Pls ignore the ramblings above

      This works

      s/$search/$search="na $1"/ge;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-06-15 22:33 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.