in reply to Call a CGI script from another CGI script most independently

To execute another CGI (#2) from within your CGI (#1) you have two basic options

Option 1

Execute as if from the command line. There are a couple of variations on this, as discussed by shemp in his reply. In this case the web server is completely bypassed, and you'll need to simulate any environment vars that your script is expecting to be populated by the web server (browser version for example) and simulate any expected parameters coming into the CGI as well. You may want to do this if, for example, you wish to bypass the .htpasswd access controls.

This can be as simple as this code snippet of mine from one of my tests (using backticks):

$err = `./makeCounter-report.cgi foo=bar`; ok( $err , '*** makeCounter-report : compile/run ');
Note that this particular CGI uses the debug option allowing command line args to be tranmogrified into params:
use CGI qw/:standard -debug/;

Option 2

Access the CGI #2 as if you were a browser. This can be accomplished using the LWP or CGI module for example as discussed by LameNerd or sauoq . In this case since you have gone through the web server, you'll be forced to abide by all the .htaccess permissions.

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday