sub parse { if ( $_[0] =~ /\[(.*)$/ ) { parse($1)} else { if ($_[0] =~ /(.*)\]/ ) { #Do your replace on $1 }else{ die "Unmatched brackets found"; } } }
or something like that anyway. But you probably wouldn't want nested brackets in a template system.
____________________
Jeremy
In reply to Re: (tedv)Re: Template system and substitution
by jepri
in thread Template system and substitution
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |