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

Re: Lvalue Str::words iterator

Thread Previous | Thread Next
June 15, 2005 11:02
Re: Lvalue Str::words iterator
Message ID:
Ingo Blechschmidt skribis 2005-06-15 19:14 (+0200):
> as Larry mentioned in another thread that he wants a "different
> notation for word splitting"
> (,
> how about that, similar to Haskell's "words" function:

"words" is wrong for something that splits. It'd be right for something
that matches. Let me demonstrate:

    "(foo bar --baz blah-- quux)".words;

This should return <foo bar baz blah quux>, not <(foo bar --baz blah--
quux)>. So the name "words" isn't good for this.

>     say join ",", @words;     # "hi,my,name,is,ingo";

Following the logic that .words returns the words, the words are no
longer individual words when joined on comma instead of whitespace...


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