in reply to Re: Re: Consolidate info in a while() loop
in thread Consolidate info in a while() loop
pojif (!defined $line[0]) { $line[0] = ""; } # $line[1] = &formatNumber($line[1]); ### take this out if (($report3 == 1101)) { printf("%-66s %13s\n", $line[0], $line[1]); #Here's the bugger. This is the line that prints what I need my $weekday = substr($line[0],0,3); ## add $total_day{$weekday} += $line[1]; ## add +. } elsif (defined $field{$report3}) { printf("%-66s %13s\n", $line[0], $line[($field{$report3}+1)]) +; } $count3++; } } # print totals in correct order my @days = qw(Mon Tue Wed Thu Fri Sat Sun); for (@days){ printf( "%-66s %13s\n",$_,formatNumber($total_day{$_}) ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Consolidate info in a while() loop
by peppiv (Curate) on Jan 22, 2003 at 13:38 UTC |