this works great on something like "$v1 $v2"...but if FILE contains something like "$v1 $v1", it gets replaced with like "$ghFjgjf $ldkSmd" instead of "$ghFjgjf $ghFjgjf" which is what i would have hoped. ($/ is set to "" so it only takes one pass to get through FILE, and i used /g for the regex so all instances of the matched pattern are substituted, to no avail)$/=""; while(<FILE>) { s/(?<!\\)(\$\w+(?![\[{\w]))/rvg()/ge; print; }
In reply to loop/substitution problem by cghost23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |