During development it helps to add the following line to your CGI script:
use CGI::Carp qw( fatalsToBrowser );
This will, hopefully, cause an error to be sent to your web browser if something went wrong with your script.

Next, the line in your code:

print $query->('dssp file used is $dssp_file');
makes me wonder if you didn't mean something like this:
print $query->p('dssp file used is $dssp_file');
.. at least ->p() is a function implemented in CGI (it wraps <p>...</p> tags around your text).. I don't know what the behaviour of the ->() call would be from your CGI object $query.

Finally, as holli mentions, you appear to be missing lines of code, not least because I couldn't count 45 lines there to find your error.. or at least look at the 2 or 3 preceeding lines that may have caused the error.

PS: did you add use strict; to your script..

Considered (holli): force insert "Update notification". author changed original content and did not react to a /msg
Unconsidered (holli): Enough keep votes (Keep/Edit/Delete: 6/12/0)


In reply to Re: CGI script query by monarch
in thread CGI script query by Angharad

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.