Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi there,

I've written a perl script(checkform.pl) to check the entries of a -web browser- form and process it in a certain way. My code was working perfectly till i added a perlpod section at the end of it. Now I am getting the following message from the browser: "CGI failed Please inform the author. More information on CGI support can be found in the FAQ. Look at the log files in /var/apache for any error messages from the program"

the error log shows the following message: Mon Jun 10 10:30:08 2003 error Missing right bracket at /scripts/checkform.pl line 13, at end of line syntax error at /scripts/mthomas/checkform.pl line 13, at EOF

perl -c checkform.pl returns that my syntax is ok. Once i removed the perlpod section, the code worked fine again! really weird

Did any one encounter such problem? Am I missing anything?

Thanks, Michelle

Replies are listed 'Best First'.
Re: CGI and perlpod
by dash2 (Hermit) on Jun 10, 2003 at 00:45 UTC
    Show us the script.

    andramoiennepemousapolutropon

Re: CGI and perlpod
by gellyfish (Monsignor) on Jun 10, 2003 at 08:11 UTC
    Did you try putting an __END__ after the code and before the pod? This might help to determine whether the problem is with your code or the pod. However I think we would really need to see the code as has already been mentioned.
    /J\
    
      Here's my perlpod, it's written after the code finishes.

      __END__ =head1 NAME checkform.pl - it: + Processes data from a HTML form, + Queries or update a flat file text database + Writes a summary of the transaction back to the web browser and + Logs the transaction details in a text file =head1 USAGE I've written few lines here =head1 DATABASE STRUCTURE I've written few lines here =head1 Log File STRUCTURE I've written few lines here =cut
        Well that wouldn't cause the error you describe - you must have overwritten a closing '}' when you added the pod.
        /J\
        
      I figured it out.
      You have to replace the __END__ with 1; (that's number 1 followed by a semicolon).

      Cheers, and tanx for the help