So, I have a little problem that determines what Perl does in the following case:
while(1){
$inputLine=<STDIN>
#parse $inputLine below
#BUT FIRST, I need to check if $inputLine = EOF
}
before I get the obvious answer to using while(<>){}, let me say that there is a very strong reason why I have to do the above (basically, set an alarm to interrupt the lock, and I did not want this code cluttering up the example).
Is it possible to compare $inputLine == undef(as I think, this is what STDIN returns at the end).
Thank.
source
share