in reply to Help with Regexp substitution using variables
You can use /ee to eval results of the first eval (as Dave suggested). In fact, I believe that you can add 'e's to recursively evaluate as many iterations as you want. For example:
I hope this helps.> perl -e "$string='ReplaceMe';$s1='Bug';$s2='$s1';$s3='$s2';$string=~ +s/Me/$s3/eeeg;print $string" > ReplaceBug
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with Regexp substitution using variables
by kwokna (Initiate) on Jan 20, 2005 at 17:02 UTC |