I think that you could either use system or exec to call the second program, passing it's parameters on the command line, or you could create a module from the second program, use it and move the outer-most level of logic in the second file into the first... I apologize if I'm missing what you're getting at.