my %dispatcher = ( foo => compute_interval($titi), bar => compute_interstice($tata), baz => compute_inact_and_expo_effective($toto), qux => get_exposure_service($bling) ); $dispatcher{$action}->() if exists($dispatcher{$action}); sub compute_interval { my $args = shift; return sub { # do something useful with args here.. } } sub compute_interstice { my $args = shift; return sub { # and so on } }