but with this code it is not possible to escape the variable name expansion (e.g. by putting a \) in front of the $. Since there are probably some pitfalls around it would be wise to use an exisiting templating system (btw: is there any reason that so many templating systems exist? ;-)foreach (keys %global_variables) { $content =~ s/\$\($_\)/$global_variables{$_}/g; }
| Regards... | Stefan |
| you begin bashing the string with a +42 regexp of confusion | |
In reply to Re: Template Question
by stefan k
in thread Template Question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |