my $z; my $x = sub { $z = 2 + 2 } ; &$x; # Oh, I derefernce it like I do other references, # with the standard subroutine prefix. Gotcha.... print $z;