in reply to control-d out of loop?
When you type a Control-D, it simply terminates the input; the Control-D character does not get passed in as input. Anyway, if you rewrite your loop, you don't need to check for Control-D:
<STDIN> will return undef when there is no more input on STDIN.while($picks = <STDIN>) { chomp($picks); # do stuff }
In Section
Seekers of Perl Wisdom