in reply to getting subroutine names
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: getting subroutine names
by linuxfan (Beadle) on Jan 13, 2005 at 02:13 UTC |