Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I'm guessing you didn't include any error messages in your post because this is a CGI script and you don't know how to find them. Here's some tips for debugging CGI errors.

  • Use perl -c <filename> after any changes. This tells perl to load up your script and parse it but not execute it ('use' statements and BEGIN blocks will be executed). If there are any syntax errors in your script, they should be found here. Since you're getting an error when trying to use strict, this should tell you more about the problem.
  • Execute the code from the shell. This is real easy if your script doesn't accept form input or look at web server provided environment variables but even if it does that's easy enough to provide. Any expected environment variables can be set to appropriate values before executing the script. Form variables can be provided on the command line as field=value pairs (you are using CGI.pm to parse your form input, right?).
  • If you get past these steps and still have problems executing your code from a browser, look for your web server's error log file. Any output to your application's STDERR should be written to that file. As an alternative, add the following to the top of your script to have your own error log:
    BEGIN { open STDERR,">>my_script_errors.log" or die "Unable to open errorlog"; }

    Make sure that whatever account your web server uses to execute scripts has write access to the file and directory you specify.

90% of every Perl application is already written.
dragonchild

In reply to Re: Problems with using strict by pfaut
in thread Problems with using strict by kiat

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found