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.
In reply to Re^2: [Solved]Need to extract a particular block of lines between two patterns
by Laurent_R
in thread [Solved]Need to extract a particular block of lines between two patterns
by chengchl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |