[Israel.pm] parsing columns

Eitan Schuler eitan.schuler at gmail.com
Sat Aug 13 23:11:01 PDT 2005


Dear Offer,
I would probably try to create an unpack string dynamically.
While parsing the header I would see where each column begins.
In the header the character before 'header2' for example must be a whitespace.
Remembering these delimiter positions between the rows you can check
in for each line
if in these positions located whitespace or not.
In a "regular" case: rows 1 and 2 have no problem, since you can use
your unpack string you have created while parsing the header.
In row3 you can identify that the 'whitesapce positions' have
non-whitespace characters, and
then you can change the unpack string accordingly.

-- 

Thank you
Eitan

--
"Computer Science is no more about computers than astronomy is about
telescopes." (Edsger Wybe Dijkstra)




More information about the Perl mailing list