http://www.perlmonks.org?node_id=335290


in reply to manipulation of ps command output

Rather than parsing the output of ps, I like Proc::ProcessTable for this sort of thing.