sub foo { print 'Foo!' }; sub bar { my( $output ) = @_; $output->(); }; bar( \&foo );