$ cat sploot2.pl #!/usr/bin/env perl use strict; use warnings; use Data::Dumper; use Test::More; my %sub = ( t01=>{ name=>\&mine, args=>[qw/one first two second/] }, t02=>{ name=>\&mine2, args=>{qw/one first two second/} }, ); for my $T (keys %sub) { $sub{$T}->{name}->($sub{$T}{args}); } done_testing; sub mine { # named arguments example my %args = @{$_[0]}; ok( $args{one} eq 'first', 'arg one' ); ok( $args{two} eq 'second', 'arg two' ); } sub mine2 { # named arguments example my $args = shift; ok( $args->{one} eq 'first', 'arg one (b)' ); ok( $args->{two} eq 'second', 'arg two (b)' ); } Roboticus@Waubli ~ $ perl sploot2.pl ok 1 - arg one (b) ok 2 - arg two (b) ok 3 - arg one ok 4 - arg two 1..4