$userInput = ; chomp $userInput; $userInput = uc $userInput; # you could probably do this on the STDIN, but I am not sure. # Another monk should be able to tell you. ( $userInput eq 'L' or $userInput eq 'LIST' ) ? list_phone_book() : ( $userInput eq 'A' or $userInput eq 'ADD' ) ? add_to_phone_book() : ( $userInput eq 'D' or $userInput eq 'DELETE') ? delete_from_phone_book() : ( $userInput eq 'Q' or $userInput eq 'QUIT' ) ? quit_phone_book() : unknown_selection();