in reply to Re: TOTAL Element understanding - Why and how to use this?
in thread TOTAL Element understanding - Why and how to use this?
Thanks for your responses! I would like to understand more in details, If you are telling highest is app label ( CGA,HGS,YAG, TAG) then device label (Computer,Mobie) then browser label (IE11,CHROME,EDGE), In the loop, its checking the counts for %pivot hash by $pivot{$app}{$device}{$browser}; ? Can you please elaborate the difference between following code snippet about which sum its doing ++$pivot{$app}{'TOTAL'}{$browser}; ( is this counting total app counts and what about the browser here? Please let me know about this too ++$pivot{$app}{'TOTAL'}{'TOTAL'}; Please check entire for loop
for ($k = 0; $k <= $#responseid; $k++) { next if ($responseclientbrowser[$k] =~ /IE7/i); $worksheet1->write($row1,0, $responseid[$k],$format2); $worksheet1->write($row1,1, $responsdisp[$k],$format2); $worksheet1->write($row1,2, $responsalter[$k],$format2); $worksheet1->write($row1,3, $responseclientdevice[$k],$format2 +); $worksheet1->write($row1,4, $responseclientbrowser[$k],$format +2); $worksheet1->write($row1,5, $responseapps5[$k],$format2); $worksheet1->write($row1,6, $estdate[$k],$format2); $app = $responseapps5[$k]; $device = $responseclientdevice[$k]; $browser = $responseclientbrowser[$k]; $userid = $responseid[$k]; #print Dumper $browser; ++$pivot{$app}{$device}{$browser}; #print Dumper ++$pivot{$app}{$device}{$browser}; ++$pivot{$app}{'TOTAL'}{$browser}; # print Dumper ++$pivot{$app}{'TOTAL'}{$browser}; ++$pivot{$app}{'TOTAL'}{'TOTAL'}; #print Dumper $pivot{$app}{'TOTAL'}{'TOTAL'}; ++$pivot{$app}{$device}{'TOTAL'}; ++$pivot{'TOTAL'}{$device}{$browser}; #print Dumper $pivot{'TOTAL'}{$device}{$browser}; #++$pivot{$app}{$browser}; ++$categ{'device'}{$device}; ++$categ{'browser'}{$browser}; ++$app{$app}; $row1++; #print Dumper $app; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: TOTAL Element understanding - Why and how to use this?
by hdb (Monsignor) on Apr 23, 2019 at 07:40 UTC |
In Section
Seekers of Perl Wisdom