in reply to Best Macro Syntax for Perl?
There are a few modules on CPAN that already parse this kind of syntax. Or take a look at what other template modules on CPAN use.
Update2: depending on your exact needs, you could also get away with things like sub { $1 + $2 } but that more or less implies you're not parsing whatever is in $1 and $2 at compile time.
|
|---|