I have a scriptA.cgi which calls scriptB.cgi.
scriptB.cgi requires a param.
I have tried both inside scriptA.cgi I have tried:
`perl -l scriptB.cgi foo="toast is good" `;
as well as
@args = ("perl", "-l", "scriptB.cgi", "foo=\"toast is good\"");
system(@args);
When I call scriptA.cgi from the command line it works as expected. However when I call scriptA.cgi through the browser scriptB.cgi is executed but it fails to read the incoming param and prints foo as empty.
Is there a less ugly way to call one cgi from another and pass in params?
scriptB does not have to be a cgi, if it's easier to do this with a straight .pl and args, I'm happy to do that too... but the arg has to be a quoted string with spaces.
All thoughts welcome.