# print lines from a file handle and stop when done while (my $line = ) { print $line; }