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

Re: Lvalue Str::words iterator

Thread Previous | Thread Next
From:
Juerd
Date:
June 15, 2005 11:36
Subject:
Re: Lvalue Str::words iterator
Message ID:
20050615183552.GO7412@c4.convolution.nl
Ingo Blechschmidt skribis 2005-06-15 20:18 (+0200):
> >>     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...
> sorry, I don't quite get that.

    "foo bar baz".words.join(',').words.join(':') ne 'foo:bar:baz';

so somewhere in that process, foo, bar and baz managed to no longer be
words by the definition of words used by an on whitespace splitting
words method - they're one word, together, when they're joined on comma.

It was a demonstration of why "words" for this feature is a bad name,
not anything against the presentation using commas.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

Thread Previous | Thread Next


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