I suppose that was predictable. In fact, from the documentation for Text::Template...
When people make a template module like this one, they almost always start by inventing a special syntax for substitutions. For example, they build it so that a string like %%VAR%% is replaced with the value of $VAR.
Ha! I started using %-VAR-% after the second iteration. That's COMPLETELY different.
Then they realize the need extra formatting, so they put in some special syntax for formatting. Then they need a loop, so they invent a loop syntax. Pretty soon they have a new little template language.
Okay, so I hadn't gotten to the looping part. Anyway, it looks like Text::Template will do exactly what I need, better than I was going to do it, and I could have saved myself a day and a half if I had thought to look for it first. I honestly hope I am able to forgive you someday :-)
Thanks for the quick and helpful reply.
In reply to Re^2: Regex with variables
by eshafto
in thread Regex with variables
by eshafto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |