#!/usr/bin/perl #Initialization my @in=( [...], [...], ); my $MaxAgc0 = "1.15503129132678e-005"; # MaxAgc0 is a constant #Interpolation if (@in) { for my $i (0..$#in) { my $ptr = $in[$i]; # convenience. # we don't need the first item to be a count of sectors anymore. # we also don't need this loop at all. #for my $j (0..$#$ptr) #{ # so we also reduce the numbers here. my $num = $ptr->[11] * $MaxAgc0; push @Attn, $num / $ptr->[9]; #} } for my $i (0..$#in) { push @powers, ($in[$i][$_] - $Attn[$i])/100 for (1..8); } } else { # @in is empty print "\n No data to map for Panda machine. Check if input logfile is empty"; kill; }