If your variables aren't declared, you could copy them to an hashref and pass this hashref to your template parser.s/%tag%/$value/g if defined $value;
$hash = {key1 => 'value', key2 => 'value'}; ... foreach my $key (keys %$hash) { s/%$key%/$hash->{$key}/eg; }
In reply to Re: Parsing Templates
by uwevoelker
in thread Parsing Templates
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |