… | |
… | |
111 | |
111 | |
112 | @{ $self->{matches} } = (); |
112 | @{ $self->{matches} } = (); |
113 | my $row = $self->nrow - 1; |
113 | my $row = $self->nrow - 1; |
114 | while ($row >= 0 && @{ $self->{matches} } < 10) { |
114 | while ($row >= 0 && @{ $self->{matches} } < 10) { |
115 | my $line = $self->line ($row); |
115 | my $line = $self->line ($row); |
116 | my @matches = $self->find_matches ($row, 0); |
116 | my @matches = $self->find_matches ($row); |
117 | |
117 | |
118 | for (sort { $b->[0] <=> $a->[0] } @matches) { |
118 | for (sort { $b->[0] <=> $a->[0] } @matches) { |
119 | shift @$_; |
119 | shift @$_; |
120 | push @{ $self->{matches} }, $_; |
120 | push @{ $self->{matches} }, $_; |
121 | last if @{ $self->{matches} } == 10; |
121 | last if @{ $self->{matches} } == 10; |