This seems to work if you insist on using flip-flop:
However, you could copy stuff from List::MoreUtils.$x = 1; print join " ", grep { $x..(($x=0) or /D/) } qw(A B C D E F);
In reply to Re^3: Flip-flop won't DWIM
by akho
in thread Flip-flop won't DWIM
by wu-lee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |