in reply to finding the status of the program being called from perl

this is what I use, it may be of help.