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;