I never said there was a Perl flip-flop operator. OK the OP did say flip-flop matching which implies yet a third thing to be just as picky. But I presented $x = !$x in my code suggestion as the simplest implementation in Perl of a flip-flop I can think of, irrespective of what it's used for.