HTML::Entities is off of CPAN so you may not have it. Sorry for not checking. For a quick test you can make the following modification:
--- files.pl Sat Jan 13 11:31:40 2001 +++ files2.pl Sat Jan 13 20:51:31 2001 @@ -1,7 +1,6 @@ #! /usr/local/bin/perl -T use strict; use CGI qw(:standard upload); -use HTML::Entities; print header(), start_html('Upload Test'), h1('Upload Test'), start_multipart_form(), "Enter how many files to upload: ", textfield("filecount"), br(); @@ -19,6 +18,11 @@ next; } print p(), h3("Uploaded $handle"), br(), "<pre>"; - print encode_entities($_) while <$handle>; + while (<$handle>) { + s/&/&amp;/g; + s/</&lt;/g; + s/>/&gt;/g; + print; + } print "</pre>"; }
(The solution with the original module is able to handle unexpected input better though.)

Also it sounds like you have not yet discovered your server error logs. If you are on a Unix-like system it will be something like /var/log/apache/error.log. When you get these internal errors the tail of that will have all sorts of useful information. In similar vein you should try running the CGI script interactively, that can identify many problems.

Several other good tips are here - highly recommended despite the name. (A little dated now, but good advice nonetheless.)


In reply to Re (tilly) 8: Quick Regex question by tilly
in thread Quick Regex question by Stamp_Guy

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.