in reply to Re: parsing variable input (perlre problem)
in thread parsing variable input (perlre problem)

ps output is fixed field format

Well yes... until something unforeseen happens and one of the fields gets too wide. At which point the substr (or unpack - which might be more efficient) method breaks horribly :-/

  • Comment on Re^2: parsing variable input (perlre problem)

Replies are listed 'Best First'.
Re^3: parsing variable input (perlre problem)
by Moron (Curate) on Mar 19, 2007 at 16:59 UTC
    In that case just read the field positions and widths off the header -- if a field "goes wide", the header changes to match and the header is otherwise predictable even though some columns are aligned left, some right - still in a predictable way.

    -M

    Free your mind