in reply to Dynamic interpolation in a string with a scalar variable?

A variation on some of solutions already suggested (also a closure, but not an anonymous one), shown under the Perl debugger:
DB<1> $variable = 3; DB<2> sub string(){"Variable = $variable\n";} DB<3> print string; Variable = 3 DB<4> $variable = 4; DB<5> print string; Variable = 4
It almost looks like what you're looking for, doesn't it?