$\="\n"; # output record separator $choice='1'; %hash=( '0' => \&one, '1' => \&two ); @_ = "fish"; $hash{$choice}->(); &{$hash{$choice}}; one; &one; sub one { print "one", @_ } sub two { print "two", @_ } __END__ two twofish one onefish