in reply to
flip-flop operator and sequence number
Perhaps
Tie::Cycle
might fit the bill.
Comment on
Re: flip-flop operator and sequence number
In Section
Seekers of Perl Wisdom