in reply to output caught in memory

Wrong answer - move along, nothing to see here . . .

You can try END:

sub END { close FILE; }

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--