A quick CPAN search didn't turn up anything.
Parsing would involve mostly fixed-width column data; The difficulty arises when the data in some columns exceeds the width and pushes rightward columns over. Other strategies could be to "consume" no-whitespace-words left-to-right after noting the column ordering output.
I simply don't want to start out writing this if it's already been done.
Excerpt of some sample output below. Note the last line shows the TIME column overly wide.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMA +ND root 6332 1.0 0.0 4096 660 ? S 06:25 0:00 /bin/ +sh ./monitor.sh /var/log/kern.log.1 root 6349 0.0 0.0 14976 1116 ? R 06:25 0:00 /bin/ +ps auxw ntp 10330 0.0 0.0 25808 1532 ? Ss Jul23 0:16 /usr/ +sbin/ntpd -p /var/run/ntpd.pid -g -u 106:115 root 13438 0.0 0.2 10248 4512 ? Ss Jul03 0:00 /usr/ +sbin/knockd -d -i eth0 bind 24285 4.6 2.2 212112 46136 ? Ssl Jul17 1056:29 /usr +/sbin/named -u bind
In reply to Module to parse output from Unix ps command? by shriken
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |