in reply to Interacting with other programs

What do you mean with "execute the input file"?

If you can do the process from the command line, you should be able to do it with system().

For instance, this command line sequence:

$ grep 'some-pattern' <input-file >output-file
can be executed with system like so:
system("grep 'some-pattern' <input-file >output-file") and die "Error +executing grep";