... while ( not eof( STDIN ) ) { chomp( my $line = <> ); ... } ...