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
In reply to Re: Replacing text - problem with $1 variable
by matsmats
in thread Replacing text - problem with $1 variable
by kr00z3r
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |