ozgurp has asked for the wisdom of the Perl Monks concerning the following question:
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."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How can I call subroutines in an array
by Chmrr (Vicar) on Jun 10, 2003 at 04:54 UTC | |
Re: How can I call subroutines in an array
by dvergin (Monsignor) on Jun 10, 2003 at 04:55 UTC | |
Re: How can I call subroutines in an array
by eyepopslikeamosquito (Archbishop) on Jun 10, 2003 at 08:17 UTC |