On Sat, Dec 04, 2004 at 01:24:41PM -0800, Larry Wall wrote:
: I suppose we could also have
:
: for words <> {...}
: for tokens <> {...}
: for paragraphs <> {...}
: for chunks(<>, :delim(/^^===+\h*\n/)) {...}
:
: etc.
I see a problem with
for words <> {...}
since there's likely to be a words method on strings. Maybe we want:
for fwords <> {...}
Er...on second thought, we probably just have to write:
for words =<> {...}
or
for words(lines()) {...}
instead. And of course, tokens() is silly unless you have defined a lexer.
Which leaves paragraphs(), which is not really common enough to do as other
than a mod to the filehandle. So it comes back to lines/chunks/files.
Larry