in reply to shelling out too much

Or, learn to fork, p.147 in the llama book. You integrate both programs into one, and spin off the portion which does the secondary processing. As a second, suggestion, if you use
system('myscript.pl', '-h');
there's less shelling. :D