The website I support allows companies and clubs to maintain the mailing lists on line. They can download the list as a CSV list to use in their own label printing software. I create the list normally and send it to them via this routine:
# # GET THE LABEL FILE # $key = 'Labels'; $file = "$path/labels/$key"; # # SEND THE FILE TO THE BROWSER # print "Content-Disposition: attachment; filename=$key.txt\n"; print "Content-Type: application/octet-stream\n\n"; my $buffer; open (FILE, "$file"); print $buffer while read(FILE, $buffer, 4096); close FILE;
Normally the receipient's browser show's the file as 'Label.txt'. However I have a customer that is using XP Home and they keep getting a notice that says the file is a '.cgi'. I have them change the file type to '.txt'. I've tested this little code above on XP Professional and I don't have this problem. Any ideas? Thanks, Ron

In reply to Downloading a file to XP Home changes the extenstion by UncleRon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.