This code gives the following messageuse strict; use warnings; my @procs; sub a1 { print("a1\n"); } sub a2 { print("a2\n"); } @procs = (&a1, &a2); foreach (@procs) { $_; }
what is the better way of doing this?"Useless use of a variable in void context at C:\test.pl line 19."
In reply to How can I call subroutines in an array by ozgurp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |