$text =~ s/<%(.+?)%>/$vars->{$1}/g || warn("unable to substitute $1");
This statement is puzzling. If zero substitutions are done, two warnings are emitted (assuming you have warnings enabled). What is the purpose of printing $1 when it is undefined?
Give a man a fish: <%-{-{-{-<
In reply to Re^2: Invoke the Perl string interpolation engine on a string contained in a scalar variable.
by AnomalousMonk
in thread Invoke the Perl string interpolation engine on a string contained in a scalar variable.
by ibm1620
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |