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