I need a script to receive a POST request and then to send that same POST request to a different script. I don't mean that this is a redirect; the script simply notifies another script.
In theory, the first script could just immediately exec the second script. The second script would inherit the same environment (ie. CONTENT_LENGTH) and STDIN (from which it can read the POST data).
This would be very simple & efficient. The first script would (in theory) need be nothing more than:
#! perl exec 'theSecond.pl';
But then, what would be the point? Why not just put the code from the second script in the first avoid the need for the exec?
|
|---|