in reply to Re^3: Searching parallel arrays.
in thread Searching parallel arrays.

Thanks. Looks like there are two bugs. The '1, 2, 3, 4' is being missed because the test in the loop is incorrect (due to my trying to avoid writing the test twice). The loop should be:
foreach my $number (@sorted_numbers) { push @recent, [ $number, $from_whence{$number} ]; shift @recent if @recent > 4; check_and_handle_contig(\@recent) if @recent == 4; }
the other sequences are missed because of the numeric sort problem L~R noticed. The sort should be:
my @sorted_numbers = sort { $a <=> $b } map { @{$_} } @source_data;
with these changes in, it seems to find them all. Thanks for the test cases :-)