foreach my $line (@data) { # lots of irrelevent code for (my $i =1; $i < @array; $i++) { # once again lots of irrelevent code %gradient_hash = map {$matching_temps[$_] => $gradients[$_]} 0 .. $#matching_temps; while (($key2, $value2) = each (%gradient_hash)) { if (($value2 > 0.1) || ($value2 < -0.1)) { @steep_grads = $key2 . '?' . $value2; @slopes = $value2; } } @unique_slopes = grep {! $seen2{$_} ++} @slopes; print "@unique_slopes
";
}
}
## ";
}
}
##
for (my $i = 1; $i < @unique_slopes; $i++) {
if (($unique_slopes[$i] < -0.1) && ($unique_slopes[$i-1] > 0.1)) {
print "PEAKS: $unique_slopes[$i-1] $unique_slopes[$i]