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

Re: Question about list context for String.chars

Thread Previous | Thread Next
Ingo Blechschmidt
April 11, 2005 11:14
Re: Question about list context for String.chars
Message ID:

gcomnz wrote:
> I'm writing a bunch of examples for perl 6 pleac and it seems rather
> natural to expect $string.chars to return a list of unicode chars in
> list context, however I can't find anything to confirm that. (The
> other alternatives being split and unpack.)

I like that.

If one wanted to have the *number* of chars/graphemes/whatever, one
could still use the cheap unary "+" operator.

And .keys, .values, .pairs, etc. don't return a plain number, but actual
contents, too (consistency!).


Linux, the choice of a GNU | Wissen ist Wissen, wo man es findet.  
generation on a dual AMD   | 
Athlon!                    | 

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