sub foo { ... } sub bar { ... } my %hash = ( foo => \&foo, bar => \&bar, ); $var = "foo"; &{$hash{$var}}(@args);