read (STDIN, $query, $ENV{'CONTENT_LENGTH'}); $query .= '&cmd=_notify-validate'; # set up connection and do the request my $socket = IO::Socket::INET->new( 'www.webserver.com:80' ) or die; print $socket "GET /cgi-bin/webscr?$query HTTP/1.0\n\n"; # check return status my $status = <$socket>; die "Unacceptable status: $status" unless $status =~ /200/; # lose the HTTP header while (<$socket>) { last if /^\s+$/s; } # get the body while (<$socket>) { $res .= $_; }