Check your server logs to see what the error is-- it's likely a permissions problem, but depending on the server could also be a Perl version problem.

For example, Mac OS X has multiple Perl installs and you can write something that works fine from the terminal, then the CGI handler uses a different version of Perl that doesn't have any of your modules installed. Particularly annoying, since OS X depends on having the version it wants, so you end up with 2 or 3 (or more) installs and having to sort between them.

But it's most likely permissions, since the CGI will run as a different user than you run as in command line mode. There are other possibilities, as well, and your server's error log should give you a clue where to look

EDIT: also, if you really think it's the size of the target HTML, an easy check would be to put a mini-version of the target page up (or something similar) that has just enough data for your CGI to act on. You could even do it as dummy data embedded in the Perl code itself-- that would let you test that possibility quickly. But look at the error logs first- it might tell you exactly what the problem is


In reply to Re^3: Parse HTML content by bitingduck
in thread Parse HTML content by mailmeakhila

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.