in reply to Simulating Form Posts from within PERL

First, I agree with previous posters that using LWP is probably a good thing.

That said, it looks like what you have is fine.

You might want to add:

print while (<$sock>);
at the end of it so that you can see what the server returns.

Update: What you have is fine with my setup. I tested it against the following cgi script:

#!/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);
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.)
 
-sauoq
"My two cents aren't worth a dime.";