Are you saying that STDIN is getting opened and closed every time a line is read? I guess that would explain why there is nothing there. :)
How about a small variation where I need to print something (a prompt or line number) on the terminal before reading the line (so I couldn't have <> in the loop control)? The (broken) code would be something like:
while ()
{
print $foo;
<>;
last unless /\S/;
print FILE;
}