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

Re: Lvalue Str::words iterator

Thread Previous
Larry Wall
June 15, 2005 17:07
Re: Lvalue Str::words iterator
Message ID:
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+/).


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About