my %dispatch = ( foo => &somefunc, bar => &someotherfunc, baz => sub {...} );