I think what you'd be better off doing is "requiring" or "use"ing the indexer.pl script, rather than running it from a new shell.
So, I'm guessing that if the current dir while running your cgi script is the cgi directory, you should just be able to put
require "indexer.pl";
into your script. I think you'd need to monkey a bit with the indexer script, making it return a 'true' (i.e. non-zero) value at the end.
Thoughts, anyone?
Comment on Re: Problem calling one script from another