http://qs321.pair.com?node_id=659099


in reply to Re: ps in perl?
in thread ps in perl?

Perl provides you with a mechanism for reading the output of a system command, via backticks or the qx operator, which means you can eliminate the temporary file and process the output directly:
foreach my $line ( qx[ps -ef] ) { # find the $line you're looking for }
I've used the Proc::ProcessTable module with success, and second McDarren's recommendation, though.

-- Douglas Hunter