#!/usr/bin/perl use warnings; use strict; while (<DATA>) { my @columns = do { my $s; map $s += length, /(\s*-+)/mg } ; print "@columns\n"; } # Output: # # 13 40 50 56 83 90 96 109 122 # 14 22 __DATA__ ---------- ------------------------- -------- ---- -------- +----------------- ----- ---- ----------- ----------- ----------- ------
Cheers,
Tom
Tom Moertel : Blog / Talks / CPAN / LectroTest / PXSL / Coffee / Movie Rating Decoder
In reply to Re: text parsing question
by tmoertel
in thread text parsing question
by kfarr2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |