in reply to Re: Need advice (module) to parse nested IF/ELSIF..
in thread Need advice (module) to parse nested IF/ELSIF..

Sounds like you're writing a templating system

Clippy, is that you? ;-)

Seriously though, I'd second the Template Toolkit recommendation. You (the original poster) can use the START_TAG and END_TAG config options to set the start and end tags to "<%" and "%>", then just process the template.

Here is the example from tt2's Config documentation:

my $template = Template->new({ START_TAG => quotemeta('<+'), END_TAG => quotemeta('+>'), });