my @sub_array = (\&test,\&test2); my $subref = $sub_array[0]; $subref->(); sub test { print "hello world"; }