Help for this page
sub do_x { print "processing x\n"; ... } my %subs = ( x => \&do_x, y => \&do_y );
$subs{$type}->();