in reply to Is it possible to write to STDIN ?

Compile your cgi into a subroutine with CGI::Compile, wrap it with CGI::Emulate::PSGI, then install LWP::Protocol::PSGI, so you can talk to your cgi with WWW::Mechanize

Or maybe just use Test::WWW::Mechanize::CGI, it uses HTTP::Request::AsCGI

  • Comment on Re: Is it possible to write to STDIN ? (fake CGI POST STDIN)

Replies are listed 'Best First'.
Re^2: Is it possible to write to STDIN ? (fake CGI POST STDIN)
by exilepanda (Friar) on Jul 21, 2014 at 07:44 UTC
    Thanks for the suggestion, however, I think I am not going to trigger any http mechanism at all (for the sake of a slow notebook with 10K+ batch requests). I just wanted to write into STDIN (if any chance or alternative approach). Just want my main script get the form like it's from server self.

      Yes, I think both parts of my answer cover both situations :) 10K+ really ain't that many :)

        Yeah I got it now =) but still do you know if there's anyway I can write into STDIN?