##
if(grep $_ eq $user_input, @{$word{substr $user_input, 0, 1} || []}) {
# it's there
}
else {
# no, that wasn't it
}
####
chomp, $_ = lc, push @{$word{substr($_, 0, 1)}}, $_ while <$fh>;
# and
grep lc eq $user_input, @{$word{substr($user_input, 0, 1)} || []}