Here's an alternative, whether it's an improvement is your call:)
$str =~ s[("[^"]*?(?<!\\)")] { (my $temp = $1) =~ s[(?<!\\)\$][\Q\$]g; $temp; }mge;
In reply to Re: Escape $ inside quotes only
by BrowserUk
in thread Escape $ inside quotes only
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |