Help for this page
my $x; my $str = sub { "hello ".${\$x} }; ... print $str->(); $x = 'chickenman'; print $str->();
{package XYZ; sub new { ... print "homedir: ".$xyz->homedir()."\n"; print "exec: ".$xyz->executable()."\n"; # note, when dealing with paths use File::Spec->catdir()