in reply to regex understanding help

G'day t-rex,

That looks like Template Toolkit data.

It can be used for a number of things. A typical usage is to embed Perl code in HTML.

Here's a quick and dirty example of what's going on. First, without the eval:

$ perl -E 'my $x = "Ken"; say "<p><%\$x%></p>" =~ s/<%(.*)%>/$1/er' <p>$x</p>

Now, with it added:

$ perl -E 'my $x = "Ken"; say "<p><%\$x%></p>" =~ s/<%(.*)%>/eval $1/e +r' <p>Ken</p>

So, that started with Perl code (\$x), inside a Template Toolkit wrapper (<%...%>), inside HTML (<p>...</p>). The result is pure HTML: <p>Ken</p>

However, all that work is normally done by Template Toolkit: you shouldn't need to process that data yourself.

— Ken