foreach my $array (@array) { eval "$array->()"; } #### my %test_functions = ( test => \&test, test2 => \&test2, test3 => \&test3, ); $test_functions{$_}->() for qw/ test test2 test3 /;