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.