my %actions = ( 'login' => sub { require Login; do_login(); }, ... ); #### Use of uninitialized value in subroutine entry at ... Can't use string ("") as a subroutine ref while "strict refs" in use at ..... #### $query = 'default' unless exists $actions{ $query };