in reply to Process display

Since nobody has mentioned it yet, and you're processing the output of ps(1), you may be interested in (knowing about and possibly) using Proc::ProcessTable.