in reply to Delaying interpolation
use strict; my $foo = 'nothing yet'; sub fun { return sub { return "foo has value $foo" } } my $coderef = fun(); $foo = 7; my $str = &$coderef; print "$str\n"; [download]