If you're trying to be lisp-like, you probably also want to look into closures:sub a { my ($sub) = @_; $sub->(4) } sub b { print @_ }; a(\&b);
--Davea( sub {print @_} )
In reply to Re: Passing subroutines as arguments
by dpuu
in thread Passing subroutines as arguments
by mvaline
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |