My fellow monks, I sit before you with my head hung in shame. I have nearly been beaten. Below was intended to be a simple regular expression to replace $var or $var[0] or $var{hashname} or $var{'hashname'} or $var{"hashname"} with the correct value.
$HTMLLine =~ s/(\$[\w\[\]{}']+)/'"'.$1.'"'/gee;
The above line works fine on $var but won't work on anything else.
Any help would be great!
In reply to expanding scalar content by akm2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |