> 1. You *MUST* examine the server's error log. "Prematue end of script
> headers" is just a generic message put out by Apache when it couldn't find
> the response header your script should have put out. Any error messages
> output by Perl or your script will be found in the error log. Until you
can
> see those logs, we're just guessing.

Hi just thought I'd let y'all know I've figured out how to get more
effective error messages. I decided to start from scratch with the original
sample script I posted....here's my error message now.

Missing $ on loop variable at SimLib.pm line 57.
BEGIN failed--compilation aborted at sim.pl line 25.
Obviously it's the SimLib.pm module that the perl interpreter is having
probs with. I checked the SimLib.pm module and here's what I've got for
lines 38 on. I've put a comment on line 57. I can't seem to find the
problem. I don't see where it's missing the $.
Thanks any and all for your help.
Luke

sub get_submission {
    my %ENTRY = ();
    my $GetPost = '';
    my $GetGet = $ENV{'QUERY_STRING'};

    my $cl = $ENV{'CONTENT_LENGTH'};
    if (defined{$cl}) {
        binmode(STDIN);
        while ($cl > 0 && read(STDIN, $_, $cl) > 0) {
            $GetPost .= $_;
            $cl -= length($_);
        }
        close STDIN;
    }

    my $submission = $GetGet . $GetPost;
    chomp $submission;

    # Split the name-value pairs
    foreach my $pair (split(/[&;]/, $submission)) {   #LINE 57 - the one
that has a poor loop variable that needs $
        # Convert plus to space
        $pair =~ y/+/ /;

        # Split into key and value.
        my ($name, $value) = split(/=/, $pair, 2); # splits on the first =.

        # Convert %XX from hex numbers to character
        $name  =~ s/%([A-Fa-f0-9]{2})/pack("c", hex($1))/ge;
        $value =~ s/%([A-Fa-f0-9]{2})/pack("c", hex($1))/ge;

        # Associate key and value
        $ENTRY{$name} .= "\0" if (defined($ENTRY{$name}));
        $ENTRY{$name} .= $value;
    }
    return %ENTRY;
}


> 1. You *MUST* examine the server's error log. "Prematue end of script
> headers" is just a generic message put out by Apache when it couldn't find
> the response header your script should have put out. Any error messages
> output by Perl or your script will be found in the error log. Until you
can
> see those logs, we're just guessing.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to