in reply to New module -- Fixed width data solution

It does not, e.g., seem to correctly parse the output of "ps -f" or "ps -l" (update: though I will give it credit for correctly parsing plain ol' "ps"). Probably because the column headers are sometimes right-justified and sometimes left-justified. And there doesn't seem to be any options to tweak the results to be correct.
  • Comment on Re: New module -- Fixed width data solution

Replies are listed 'Best First'.
Re^2: New module -- Fixed width data solution
by EvanCarroll (Chaplain) on May 17, 2008 at 23:30 UTC
    There are now such options... Version 0.05 will have two tests just for ps -lA. Essentially you provide ->heuristic(@lines). And, then you can $de->parse_hash($_) for @lines. Heuristic will run through BrowserUKs simply algo, then it will apply the resulting unpack string on the first row to get the columns, and index all calls to parse_hash by that data..

    Enjoy. Advice and suggestions and use cases are all appreciated.


    Evan Carroll
    I hack for the ladies.
    www.EvanCarroll.com