in reply to Trying to grab process output.

The code you provided seems to have a few syntax errors (e.g., /usr/local/bin/perl needs the slashes to be escaped, and the regex beginning with sh is never terminated), but I've tried to clean it up as well as I could. This program is not equivalent to your Unix grep/awk pipeline, but I've tried to keep the meaning of your Perl code approximately the same.
#!/usr/local/bin/perl use strict; use warnings; open(OF,">outr") || die "File not opening outr: $!\n"; foreach (`ps -ef | grep jones` =~ /[^\n]*\n/g) { next if m!/usr/local/bin/perl ps1$! or /sh -c ps -ef \| grep jones > + outr$/; print OF; } close(OF);
Hopefully this does about what you want. A couple of points about it:

-- Mike

--
just,my${.02}