in reply to Simulating Form Posts from within PERL
That said, it looks like what you have is fine.
You might want to add:
at the end of it so that you can see what the server returns.print while (<$sock>);
Update: What you have is fine with my setup. I tested it against the following cgi script:
The ouput was exactly what you'd expect. The only change I made was to the path of the cgi. (I also added my suggestion above so that I could see the output.)#!/usr/bin/perl use CGI; my $q = new CGI; my @keys = $q->param; print "Content-type: text/plain\n\n"; print "$_ ",$q->param($_),"\n" for (@keys);
-sauoq "My two cents aren't worth a dime.";
|
|---|