But your distinction between a plain text file and the .html output of your OP puzzles me again, as any difference should be negligible: the .html source is, to all intents and purposes as far as writing the file is concerned, a "plain text file."
I know what you mean. In the end I suspect that it was just because when I tried sending the output as plain text it greatly reduced the number of lines I sent out. All the HTMLSTUFF was removed and my do_this sub was reduced to a few lines.
sub do_this() {
open FILE, "> $filename" or die "ERROR WRITTING FILE: $filename\nSyste
+m reported $!";
print FILE "\n";
foreach (sort keys(%stuff1) ) { print FILE "$stuff1{$_} | ";}
print FILE "\n";
foreach (sort keys(%stuff2) ) { print FILE "$stuff2{$_} | ";}
close FILE;
system "start /b $filename";
}