in reply to Got's to be a better way

There is some stuff here (like $counter) that makes me think there is probably some funky code not shown here, but just working with what you've shown...

my @years = qw[05 04 03 02 01 00 99 98]; foreach my $year (@years) { foreach my $BulletinID (keys %AllPatches) { next if (substr($BulletinID,2,2) ne $year); next unless ($MissingPatchList{$BulletinID} || $FoundPatchList +{$BulletinID}); if ($counter == 7) { print HTML "</tr><tr>\n"; $counter = 0; } $MissingPatchList{$BulletinID} = sprintf("%04d",$MissingPatchL +ist{$BulletinID} || 0); $FoundPatchList{$BulletinID} = sprintf("%04d",$FoundPatchList{ +$BulletinID} || 0);

We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re: Re: Got's to be a better way
by ear (Acolyte) on Nov 05, 2003 at 18:32 UTC
    Thanks. I've made use of the sprintf's. I've used printf's before but didn't realize they would pad like that for me. I still wish there was a better way to handle the years for sorting latest to oldest (03 - 98). It seems real silly to loop through all of the data 6 times.