my $x; my $str = sub { "hello ".${\$x} }; $x = 'kevin'; print $str->(); $x = 'chickenman'; print $str->();