in reply to How to pass form data from a CGI script to its child process?

There's another option: you could use a module like LWP::UserAgent in ScriptA.pl to talk to ScriptB.pl through its URL. That way you can pass the parameters just as a browser would pass them, and ScriptB.pl doesn't have to be changed at all. ScriptA.pl just has to take the output of ScriptB.pl and do whatever you had in mind for it.

Aaron B.
Available for small or large Perl jobs; see my home node.

  • Comment on Re: How to pass form data from a CGI script to its child process?

Replies are listed 'Best First'.
Re^2: How to pass form data from a CGI script to its child process?
by Nocturnus (Scribe) on Sep 05, 2012 at 07:54 UTC

    Thank you very much for your reply.

    Your solution has the advantage that script B.pl even could be on another server than script A.pl. But in this case, I don't need this feature, so the disadvantage of being "expensive" in networking terms outweighs the advantage.

    Therefore, I have chosen another solution (see above). Nevertheless, I have voted up your proposition because it surely will work and has an additional interesting feature.

    Regards,

    Nocturnus