while ( (print "list of letters: ") and defined ($line=<>) and $line !~ /\s*quit|exit|q +\s*$/i)