Help for this page
my %way_of = ( the_sword => sub{do('sword',@_)}, the_gun => sub{do('gun',@_)}, ... my $stuff = $something_else; &{$way_of{$what} || $way_of{""}}($stuff);
if ($what eq 'the_sword') { do('sword', $stuff); ... { do('default', $stuff); }