sub function_1 { print "One\n" } sub function_2 { print "Two\n" } { # Allow symbol table manipulation. # You do use strict;, right? :) no strict 'refs'; foreach my $no ( 1 .. 2 ) { &{ "function_$no" }; # <--- THIS THING } }