That condition is so dense you missed that it devolves into an infinite loop of prints and warns. Fixed:
while (1) { print "list of letters: "; defined( my $line = <> ) or last; $line !~ /\s*quit|exit|q\s*$/i or last; # Do something with $line. }
Update: Added missing my.
In reply to Re^3: $_ not set in while <>
by ikegami
in thread $_ not set in while <>
by pidloop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |