%lang = ( "shutdown" => sub { ... }, "show" => sub { ... }, "lock_user" => sub { ... } # etc etc ); . . . &{$lang{$input}}(@args);