Help for this page
sub read_n_lines { my ($fh, $count) = @_; ... $buffer .= $_ for 1 .. $count; return $buffer; }
open(my $handle, 'c:/file.log') or die "Can't read file: $!\n"; while(not eof( $handle )) ... my $parsed = parse_chunk( $chunk ); print_parsed( $parsed ); }