my @subs = (\&test, \&another_test, \&third_test); my $sub_i_want_to_call = $subs[rand(@subs)]; $sub_i_want_to_call->();