Help for this page
my %actions = ( 1 => \&error_entry, ... my $action_sub = $actions{$value_to_check} || \&default_action; $action_sub->($args_for_this);
$object->$method($args_for_this);