Read lines from a file in chunks
Here's my take. I removed the $self structure, as it gives you no advantage, and fixed the problem with missing lines.

#! /usr/bin/perl
use warnings;
use strict;

use Data::Dumper;

sub read_in_chunks {
    my %args = @_;
    my $fh = $args{fh} or die "No filehandle given.\n";
    my $size = $args{chunk_size} || 10;
    my @chunk;
    while (@chunk &lt; $size &amp;&amp; defined(my $line = &lt;$fh&gt;)) {
        chomp $line;
        push @chunk, $line;
    }
    return @chunk
}

open my $fh, shift or die $!;

my %opts = (
    fh         =&gt; $fh,
    chunk_size =&gt; 4
);

while (my @chunk = read_in_chunks(%opts)) {
    print Dumper(\@chunk);
    # ...
}