in reply to Record separator question

I tend to do stuff like this by thinking of two "modes".

If $_ =~ m/^=====/ then we're in header_mode.

If not, we're in other_mode.

In header_mode, we do X, in other_mode we do Y.

It's kind of clunky, but it sorts out the logic wonderfully in my head.



($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
=~y~b-v~a-z~s; print