I believe you may be over thinking.
What do you WANT to do? Scan a list of processes? *I* would do that as something like $retval = `ps ax`;
Then look in $retval for your process, and if it's not there, do the actions you're interested in...
Too vague?