Post #2593026
2026-05-15 13:24 UTC
So TIL perl has a "flip-flop" operator, ".." (two dots) — if left side is true, it turns on, if the right side is true it turns off.
Yeah, "turns on" and "turns off" means it _remembers state_. Internally.
I don't think I've ever seen such a… cute? no… clever? no… obnoxious and hazard-prone language feature.
Put it in a file-processing function, process multiple files… yeah who needs scope? And a perl non-wiz like me doesn't even notice state being kept.
What a great perl-being-perl example.
Replies (0)
No replies.