my %hash = ( "foo" => \&foobar, "bar" => \&foobar, ); sub foobar{ print $_,"\n" for @_; } $hash{"foo"}->("hallo"); $hash{"bar"}->("opi");