Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: [Solved]Need to extract a particular block of lines between two patterns

by Laurent_R (Canon)
on Nov 09, 2017 at 09:00 UTC ( #1203002=note: print w/replies, xml ) Need Help??


in reply to Re: [Solved]Need to extract a particular block of lines between two patterns
in thread [Solved]Need to extract a particular block of lines between two patterns

Hi sundialsvc4,

chengchl's question was essentially: how can I use the flip flop operator and pick up only the second START .. END block of text.

Even assuming your suggested code were correct Perl code (which it isn't) and would run, it still wouldn't do what the OP was asking for, but only mimic the flip flop operator.

The flip flop operator has a somewhat surprising edge-case behavior (when exactly is it reset) which might justify writing explicit code, but your code (if it worked) would not do what was asked for.

Update: s/would do what/would not do what/;. Thanks to hippo for noticing the missing negation at the end of my last sentence above. Now fixed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1203002]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2018-07-18 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (393 votes). Check out past polls.

    Notices?