I would like to run several programs (e.g., Matlab, SAS, another Perl script) from perl, but need to wait until each is processed to start the second. The reason is the previous process spits out a txt or csv file that is used by the next. Its probably easy to do in Perl, but I can't seem to figure it out. I think I need to use fork or waitpid, but am not sure exactly how.
Maybe you can do this directly in Unix? Any help would be appreciated.
(note: accidentally deleted the original question. This is essentially what I originally posted)