Key338478082620114.285714285714 Reconcile3017780622-70Insufficient Information Training338477654-0Non-Billable Management301777893-0Non-Billable Break337933843-0Non-Billable Excess overload3379775701416.66666666666667 Management312388898-0Non-Billable Management312322304-0Insufficient Information Management312311121-0Non-Billable Adapt31237814308-0Insufficient Information Import341776584App K411.4285714285714 Break312322732-050.65687 key31237814308045.5544 Supervision319254281-0Non-Billable #### 3384 - 114.285714285714 3379 - 3017 - 3379 - 6.66666666666667 3123 - 48.105635 3417 - 11.4285714285714 3192 - #### while() { for my $a(0..$#inlst) { if($_ =~ /@inlst[$a]<\/emp>/) { $_ =~ /(.+?)<\/prod>/g; $prod=$1; if($prod > 0) { $sum=$sum+$prod; } } } print "@inlst[$a]\t$sum\n"; } }