in reply to Re: Invoke the Perl string interpolation engine on a string contained in a scalar variable.
in thread Invoke the Perl string interpolation engine on a string contained in a scalar variable.
$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: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Invoke the Perl string interpolation engine on a string contained in a scalar variable.
by localshop (Monk) on Jan 22, 2019 at 01:06 UTC | |
by AnomalousMonk (Archbishop) on Jan 22, 2019 at 02:16 UTC | |
|
Re^3: Invoke the Perl string interpolation engine on a string contained in a scalar variable.
by localshop (Monk) on Jan 22, 2019 at 01:07 UTC |