i have a function that takes an anonymous array of subroutines to do some 'stuff' with them, but i need to know how to pass the subs. I tried this:
This, however, just evaluates my_sub and gives take_subs the return value. What will work?sub my_sub { do_stuff } sub take_subs { do_more_stuff } take_subs([&my_sub]);
In reply to subs as args by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |