for (my $j=0; $j <= @grammatches; $j++) { ## Could be normal $j++ if u +se another variable instead of @matches for both ... for (my $l=0; $l <= @headmatches; $l++) { ... for (my $m=0; $m <= @sentmatches; $m++) {
You have an off-by-one error on your for loops, you are trying to access one element past the end the arrays. Those are usually written as:
for my $j ( 0 .. $#grammatches ) { ## Could be normal $j++ if use anot +her variable instead of @matches for both ... for my $l ( 0 .. $#headmatches ) { ... for my $m ( 0 .. $#sentmatches ) {
In reply to Re: Search Engine Output needs sorting
by jwkrahn
in thread Search Engine Output needs sorting
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |