sub testit{ print 'hi' };; sub doit (\&) { $_[0]->() };; my $codeRef = \&testit;; doit( &$codeRef );