I have a few different questions that I hope someone can clear up.

An error I am getting from one of my scripts is "/home/everyday/public_html/upload.cgi did not return a true value at /home/everyday/public_html/index.cgi line 66.". Which of the two files should I be looking at to find where the bug is?

Question 2: both the files as seen in the error above require() files at the top of the scripts. When the script says upload.cgi did not return a true value, is it just upload.cgi that errored out or could it be the require("header.cgi"); that's at the top of the script? And when doing line counts in upload.cgi for line 66, is it 66 lines in that file or do I have to count 1 - (first req. file line), count all those lines, then go back to my upload.cgi? I have no idea what line could be wrong because it's requiring() a file.

Last but not least, the following snippet dies

if (!defined($index_page)) { require("header.cgi"); $main_content = $ENV{"DOCUMENT_ROOT"} . "/upload.cgi"; #print "test"; print $index_page; require($index_page); exit; }
The error is "Compilation failed in require at upload.cgi line 15.". I included a test print statement fir $index_page (which is the one that's failing) and it's printing "home/everyday/public_html/index.cgi" and that file does exist and it works!. So what could be the problem?

Thanks for your help everyone.


In reply to Require files by coldfingertips

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.