in reply to Re: Extract table from a block of text
in thread Extract table from a block of text

This works perfectly with the dummy data provided in the original post, but the regex to skip the END line might be a bit dangerous because real data might contain a 'E'. In addition, if the file is large, it might be better to do a last, rather than a next, when the line with the END tag is met.

Replies are listed 'Best First'.
Re^3: Extract table from a block of text
by LanX (Saint) on Sep 21, 2014 at 10:57 UTC
    > but the regex to skip the END line might be a bit dangerous because real data might contain a E

    That's a misunderstanding, $line holds a sequence number which comes only in exponential notation (like 7E0) iff the flip-flop terminates.

    Has nothing to do with the END marker! :)

    Cheers Rolf

    (addicted to the Perl Programming Language and ☆☆☆☆ :)

      Yes, you are absolutely right, I looked at it to quickly and confused $_ and $line. Sorry for that silly comment.