while (defined(my $line = )) { # Do something with the $line }