I'm hoping someone can jog my memory here. Say I've got a file which
contains the keywords "START" and "END", with several lines in between.
Suppose I want to operate on everything between START and END (inclusive
or not, doesn't really matter, I don't think).

Naively, I would do one of a couple things: either use a multiline
regexp, or read the file until START is encountered, and set some sort
of "readthis" flag which signals the program to operate on the lines
until END is encountered, at which point the flag is unset.

*However*.... I'm pretty sure that, somewhere, sometime, I saw some much
more elegant way of doing this in ruby. I said "neat!", and promptly
forgot about it. Something involving ranges, maybe? Anybody have an idea
what I might have been thinking of, or am I misremembering?

Any help would be much appreciated. This is a great newsgroup and
mailing list; I only wish I had time to read it all.