Bros, I have a problem here that's got me flummoxed. CGI seems not to be returning a parameter that the log says is being passed. Here's the code:
use CGI; my $q = new CGI; my $function = $q->param('f'); my $id = $q->param('id'); my $table = $q->param('table'); my $coder = $q->param('coder'); if ($function eq 'load') { loaddoc($id,$table,$coder,$data); } if ($function eq 'mark') { my $h = $q->param('h'); my $t = $q->param('t'); my $junk; ($junk,my $headsent,my $headword) = split(/[sw]/,$h); ($junk,my $tailsent,my $tailword) = split(/[sw]/,$t); warn "h: $h t: $t hs: $headsent hw: $headword ts: $tailsent tw: $ +tailword"; . . . }

I am running this on Apache and it has been intermittently returning null for the h parameter, which is why I put the warn in there. So here is what the warn statement writes into the server log:

[Sat Mar 21 13:15:36 2009] [error] [client 127.0.0.1] h: t: s43w29 h +s: hw: ts: 43 tw: 29 at C:/xampplite/cgi-bin/unitize.pl line 31., r +eferer: http://localhost/cgi-bin/unitize.pl?f=mark&id=659&coder=1&tab +le=test&h=s39w9&t=s39w25
So as you can see the h=s39w9 parameter is getting passed to the script but mod CGI is not picking it up somehow. The other odd thing is that sometimes it works fine. What could explain this?!?

TIA.......Steve

UPDATE: I got the param list from CGI with $q->param and listed them in the warn, and they are all there, including h.


In reply to CGI Not Returning Parameter that's there by cormanaz

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.