I recently read through Jeffery Goff's excellent Parse::RecDescent tutorial. This inspired me to write my own context free grammar to parse the results of Data::Dumper, as eval-ing the structure is a huge security hole.
I've got everything working except for escaped character interpolation on double-quoted strings (e.g. "\t", "\n"). In other words, I want to be able to convert the string '\t' into ASCII 9. Is there an easy way to do this other than writing regexs for every escape I want to catch? Please note that I do not want to use eval, as this would just reintroduce the security hole. I also do not want to do any kind of variable expansion.
Thanks!
-Ton
BTW: I realize that Data::Dumper dumps its strings in single quote mode. The interpolation is solely for completeness. :)
-----
Be bloody, bold, and resolute; laugh to scorn
The power of man...
In reply to Selective string interpolation by ton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |