0

Dying here people! I am have basically confirmed that I my script is getting a POST and that it has some length to it, etc.:

$ENV{REQUEST_METHOD}
$ENV{'CONTENT_LENGTH'}

But this line here:

read (STDIN, $query, $ENV{'CONTENT_LENGTH'});

Comes back with $query being blank. Surely I am missing something? Wish I knew Perl better.

Thanks ahead, as always.

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by KevinADC
0

should work, but really you should use the CGI module to get post and get (and other) data into your perl based CGI scripts. Trying to do it like you are is not secure, could lead to problems.

0

Well I don't know the data coming in (this is for use with Paypal's IPN).

And the worst part is this SHOULD work! Yes, every page I have Googled says this is the way, and NOTHING!

If you meant using some other method in CGI thta I am missing, please let me know.

Thanks

0

I mean use the CGI module. To get you started:

use CGI;
my $query = CGI->new;
my %data = $query->Vars;#gets 'post' or 'get' data in name/value pairs
print $query->header();
foreach my $param (keys %data) {
   print "$param = $data{$param}\n";
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.