Get a real templating engine. You're reinventing the wheel, and you're almost certain to reinvent a worse one, as this is actually a very messy problem. Do yourself a favor and look up something like Embperl or Mason.
In reply to Danger Will Robinson! False Laziness!
by skyknight
in thread how to evaluate a variable in a string?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |