develooper Front page | perl.perl6.language | Postings from June 2005

Re: Lvalue Str::words iterator

Thread Previous
From:
Larry Wall
Date:
June 15, 2005 17:07
Subject:
Re: Lvalue Str::words iterator
Message ID:
20050616000730.GA11098@wall.org
Y'all are getting hung up on the correspondence of "words" with "word
characters", but you're ignoring the fact that most of the time people
want to do awk's version of splitting, matching \S+ words rather than \w+
words (*neither* of which actually matches what people usually mean
by words, in any case).

So I think .match should default to .match(rx:g/\S+/), if it defaults
to anything.  But I still think people would find .words much clearer
when reading someone else's code.  And the :g would be implicit,
so .words(/\w+/) would be still be a shortcut for .match(rx:g/\w+/).

Larry

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About