Normally you structure your code a little better. When CGI stuff "does not work" you should check the error logs which usually indicate *why* it does not work. See CGI Help Guide and particularly the bit about error_log. Assuming that admin.pl uses the CGI module and is in the same dir as the calling script then this should work:
exec( "./admin.pl msg=Success" );
script?some=arg syntax is HTTP syntax, not OS calling syntax. You have to use syntax your OS understands. Alternatively your newComp.pl script could do this:
use CGI; my $q = new CGI; # do stuff, generate message print $q->redirect( "http://domain.com/cgi-bin/admin.pl?msg=$MESSAGE" +);
If your scripts are not using CGI then you should probably start now. use CGI or die. I would suggest moving the functions or both scripts into a module(s) and then just having the scripts call the module functions. This is much more flexible. See Simple Module Tutorial
cheers
tachyon
In reply to Re: running a CGI script from another CGI script
by tachyon
in thread running a CGI script from another CGI script
by poprishchin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |