in reply to Stuck Value
my $c = 0; for (my $i = 1; $i < @data; $i ++) { if ($data[$i] eq $data[$i - 1]) { if (++$c >= 4) { print "Five indentical values in a row, starting at positi +on ", $i - 4, "\n"; } } else { $c = 0; } } [download]