in reply to Re^6: how to read STDIN interactively
in thread how to read STDIN interactively

Think of what it takes to stop while (<>) (which is short for while (defined($_ = <>))).