print header;
... etc ...
# Print a div box with a span element to fill in with later JavaScript commands.
#
print "
" .
" Progress on things : " .
" " .
"
\n";
...
# Loop the loop
#
my $max_things = scalar (@things);
my $thing_index = 0;
foreach my $thing (@things) {
$thing_index++;
...
# Print the current thing into the span meter.
#
print <<_EOT_;
_EOT_
# Do the things ...
...
if ($status eq "excellent") {
# Add a small div box with the thing and a tick
# image to the main div box - its all floated
# left so will fill up nicely.
#
print <<_EOT_;
_EOT_
} else {
_EOT_
} # endif excellent
} # end foreach thing