Hi monks, I don't think this isa question to be posted in a forum like this.. but still, this is the only place I found helpful, I reuest all the monks to help this novice user out of this.... I have a perl cgi script thats not working.
print "<FORM NAME="info" action="../../../../cgi-bin/decision.cgi" met +hod="POST"> /n"; print "<select NAME="clown"> /n"; foreach $ckey(sort (keys(%DECISION))) { print "<option>$ckey /n"; } print "</select> /n"; print "</FORM> /n";
When i run it locally using the perl interpreter, it prints the "ckey". The output is
<FORM NAME="info" action="../../../../cgi-bin/clotdecisions.cgi" metho +d="POST"> <select NAME="clown"> <option>b01 <option>b02 <option>b03 </select>
So nothin wrong with getting the key values from hash. But on the webpage, the Form is empty. when i see the the page source in browser, its like
<FORM NAME="info" action="../../../../cgi-bin/clotdecisions.cgi" metho +d="POST"> <select NAME="clown"> </select>
what happened to the options. can one of you mighty monks help me out with this please. i was stuck here for a long time. I would appreciate any help extended.. thanks in advance Update1: Thanks for the suggestions monks. But none of these worked. I replaces the relative path with absolute path. Comin to the way keys in %decisions are generated, The Decisions db file already exists.
tie %CLOTDECISIONS, 'DB_File', "$fdbl[2]clotdes$typedb";
There are no errors on the server error-log regarding this. Regarding what monk. Matija asked, "how you're generating the values and keys of the %DECISION hash". I donno how they have been generated. This file was created by an other person, using DB_file. Because of version compatibility problems, i had to replace the "Dbmopen" with "tie". I donno whatelse to mention here. The file permissions, path etc are fine. Coz, as I told you the cgi script displays everything, excepting the print statements associated with Db_file. Thats what i showed in the output. the form drop-down menu wouldnt show the options. it is empty. when the script can retrieve the key locally and outputit, why not on the webpage. I can't find any obvious reason, but i'm deperate. If you need more information to sort this out, kindly ask the info you're lookin for. thanks in advance.

In reply to script working locally, but not on server by talk2kvj

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.