$_
below).
foreach my $period (@overall) { my %week = %{$period}; foreach (keys %week) { my ($sch, $occ, $percent); $sch = defined ($week{$_}{'sched'}) ? $week{$_}{'sched'} : 0; $occ = defined ($week{$_}{'occur'}) ? $week{$_}{'occur'} : 0; $percent = $sch ? $occ / $sch * 100 : 0;
@overall
) of hashes (%{$period}
) of hashes (%{$week{$_}}
). Note also the 3 uses of the ternary operator.
Previous | Back to start of show | Next |
Slide: 4 mall_tally_2 | © 2003 James E. Keenan |