I've had troubles from time to time with the way various browsers work with various headers, particularly the difference between Netscape/Mozilla and IE.
Several years ago, we finally managed to stumble on a header combination that "Just Works" properly for all known versions of all known browsers, and WILL save the file with the filename that you want.
CGI::header(
-type => "application/octet-stream; name=$filename",
'-Content-Disposition' => "attachment; filename=$filename",
'-Content-Transfer-Encoding' => 'binary',
);
It's served me well for many years now.
Enjoy!