my @stat = ( ['trunk_usage' ,'% Trunk Usage'], ['pre_ivr' ,'Pre-IVR Call Volume'], ['trunk_group' ,'Trunk Group Utilization'], ['average_speed','Average Speed of Answer'], ['outage_call' ,'Outage Call Volume'], ['ivr_call' ,'IVR Call Volume'], ['non_outage' ,'Non-Outage Call Volume'], ['post_ivr' ,'Post-IVR Call Volume'],); my @row = (1,0,1,1,1,0,1,0); #while (my @row = $sth->fetchrow_array) { print qq!!; for my $i (0..$#stat){ my $chk = ($row[$i] == 1) ? 'checked' : ''; print qq!!; if (($i % 2) && ($i < $#stat)){ print q!!; } } print q!
$stat[$i][1]
!; #} print q!!;