in reply to Stuck Value

# Stuck value check for my $index (0 .. $#data - 5) { my $first = $data[$index]; next if grep {$first != $_} @data[$index + 1.. $index + 5]; # Here if a 'stuck' value was found }

Note, you should always use strictures (use strict; use warnings;). Use the Perl for loop rather than the C variant - it's a lot clearer and a lot safer.

You iterate over a range in terms of @data, but you never access the array. If @data, @channel and @QV are related data use one data structure to represent them, otherwise there are too many opportunities for the data in the various arrays to get out of sync.

Your range check looks like it should be outside the Station loop.

True laziness is hard work