Interpolating Functions and Expressions Within Strings - Perl Cookbook [Book]
Interpolating Functions and Expressions Within Strings Problem You want a function call or expression to expand within a string. This lets you construct more complex templates than with simple scalar … - Selection from Perl Cookbook [Book]
Or you can use the slightly sneaky @{[ LIST EXPR ]} or ${ (SCALAR EXPR ) } expansions:
$answer = "STRING @{[ LIST EXPR ]} MORE STRING";
$answer = "STRING ${\( SCALAR EXPR )} MORE STRING";
December 31, 2020 at 10:33:36 AM EST
*
FILLER