Thanks for your help ..
print "Content-Type: text/plain\n";
print "Content-Disposition: attachment; filename=go.bat\n";
print "Content-Type: text/bat\n";
print "Content-Disposition: attachment; filename=go.bat\n";
If you're just trying to make an application save the batch file to disk, go with "application/octet-stream", the generic type for applications.
("text/bat" would be so wrong, because batch files are applications, and you didn't put an "x-" in the subtype.)