in reply to Evaluate variable while using
use strict; use warnings; use String::Interpolate::Delayed; my $a = ''; my $str = delayed "Hello $a"; $a = 'Kevin'; print $str;
It requires UNIVERSAL::ref though, which is broken on versions of Perl above 5.24.x. (There's a patch to fix it on the UNIVERSAL::ref issue tracker.)
|
|---|