#!/usr/bin/perl #Initialization my @in=( {...}, {...}, ); my $MaxAgc0 = "1.15503129132678e-005"; # MaxAgc0 is a constant use List::MoreUtils qw(pairwise); #Interpolation if (@in) { my @Attn = map { my $num = $_->{agc} * $MaxAgc0; $num / $_->{attn}; } @in; @powers = pairwise { [ map { ( $a->{sectors}[$_] - $b ) / 100 } for @{$a->{sectors}} ] } @in, @Attn; } else { # @in is empty print "\n No data to map for Panda machine. Check if input logfile is empty"; kill; }