in reply to how to re-use "Formats"

You are setting $= to 200 but writing less than 200 lines, so you need to reset the line count. Place the following at the start of the WRITE_REPORT subroutine:
my $old = select OUTPUTLOG; $- = 0; select $old;
(and use strict; might be a good idea as well)