And, in my humble opinion, the “flip-flop operator” is one of the total flops in the legacy design of Perl. I studiously avoid using it, partly because I have been so badly bitten by code that did use it. When I stumble upon it, I excise it. Perl incorporates many clever and useful ideas, but this one is a turkey, because (as you see for yourself) you cannot “glance” at the code and immediately see at a glance what it will actually do. I choose to instead to write a “boring, old, space-wasting” if-statement block that “obviously” describes what I want the computer to do.
I really don’t want to start any sort of “flame war” here; it would be pointless to all. Up/Down votes will more than suffice.