Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: How to parse generic reports?by Anonymous Monk |
on Aug 01, 2002 at 23:32 UTC ( [id://186961]=note: print w/replies, xml ) | Need Help?? |
My solution: define each type of report line as an unpack TEMPLATE.
(You could use my little piece of code to help you with this -- Fixed length file layout - cut2fmt 2). Once you've got your templates, use regex's to identify the line type, then unpack to get the fields.
In Section
Seekers of Perl Wisdom
|
|