in reply to Calling a CGI script from a CGI script (was: CGI)

If your first CGI is modular, e.g. it has a sub you can call that produces results, you could add a "1;" to the end of the script, then require it into your first CGI and call the sub. Or you can wrap the body of the script into a sub and then require/import and call your sub.

For example, I had a few small scripts where I wrapped them in a sub something like:

#!perl -wT use strict; use CGI; # use more modules; &mysub1(); exit 0; sub mysub1 { # the body of the script } 1;
and then used CGI::Application to call the wrapped methods as run modes. If you can't install CGI::Application, you should still be able to require/import the scripts and call the methods directly.

--
hiseldl
What time is it? It's Camel Time!