in reply to STDIN from CGI object

Do you want to do this because the request body isn't a form? If the request body isn't a form (application/x-www-form-urlencoded or multipart/form-data), then CGI provides the request body in $cgi->param('POSTDATA').

If you want to do your own form handling, you could set $ENV{CONTENT_TYPE} to application/octet-stream (or whatever) and fetch the request body using $cgi->param('POSTDATA'), or you could read STDIN and set $ENV{CONTENT_LENGTH} to zero before creating the CGI object.

Replies are listed 'Best First'.
Re^2: STDIN from CGI object
by vit (Friar) on Feb 24, 2011 at 22:46 UTC
    I have exactly situation (application/x-www-form-urlencoded). So there is still a question how to get STDIN from CGI object.
      That's what the second paragraph is about.