my @tests = ( [one => \&test1], [two => \&test2], ... [twenty => \&test20], ); for my $label_code_pair (@tests) { my ($label, $code) = @$label_code_pair; print STDERR "running $label\n"; $code->(...); }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: getting subroutine names
by merlyn
in thread getting subroutine names
by linuxfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |