[Israel.pm] parsing columns

Gaal Yahas gaal at forum2.org
Sat Aug 13 07:46:10 PDT 2005

On Sat, Aug 13, 2005 at 04:21:21PM +0300, Offer Kaye wrote:
> Hi all,
> I have a text file with columns, where the columns may not be aligned,
> and not all lines may have data in all columns:
> header1     header2     header3    header4
> ------------------------------------------------------------
> l1dat1        l1dat2        l1dat3      l1dat4
> l2dat1                                        l2dat4
> l3veryveryveryverylongdat1 l3dat2
> As you can see, line1 has all data, line2 is missing clomuns 2 and 3,
> line 3 is a mess :)
> Any thoughts on parsing such a "table"?
> Please don't offer solutions suggesting to change the way the text
> file is written, I have no control over that...

What makes the second datum on line 2 dat4, but the second datum on line
3 dat2?

Gaal Yahas <gaal at forum2.org>

More information about the Perl mailing list