Think about Loose Coupling | |
PerlMonks |
Re^2: Extract table from a block of text (updated)by LanX (Saint) |
on Sep 21, 2014 at 11:07 UTC ( [id://1101448]=note: print w/replies, xml ) | Need Help?? |
Hi Choroba, As a side note: Instead of parsing the sequence number $line you could apply the technique described in Re^4: grep trouble (body of flip-flop range) to skip the boundaries of the flip and the flop. :)
Cheers Rolf (addicted to the Perl Programming Language and ☆☆☆☆ :)
UPDATEin hindsight it's a bad idea to use something like:
While it does only print the inner range ... ... it's vulnerable to mess up the empty match // (i.e. match again the last successfully matched regular expression) by any other regex happening within the if-branch. :-/ The usual trap of global dependencies!
In Section
Seekers of Perl Wisdom
|
|