in reply to Replacing text - problem with $1 variable
Try either:
perl -pi -e 's/brad(.+?)bill/brian$1bob/gm;' *.txtor
perl -pi -e "s/brad(.+?)bill/brian\$1bob/gm;" *.txtSeems like $1 is interpolated before your code is run.
Mats
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Replacing text - problem with $1 variable
by kr00z3r (Initiate) on Sep 03, 2003 at 10:20 UTC | |
by Hutta (Scribe) on Sep 03, 2003 at 12:33 UTC |