in reply to using a hash of functions

And to be more perlish, I'd probably do it this way:
while(<>) { chomp; my $func = uc($_); print (qq!"$func" not defined\n!), next unless exists $functions{$fu +nc}; $functions{func}->(); }