Write out the expected STDIN to a file called "in"
Run the app system "$app < in >out 2>err";
read in the out and err files an examine them