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

Revisiting .chars (and friends) in list context

Thread Next
From:
Joshua Gatcomb
Date:
June 2, 2005 07:59
Subject:
Revisiting .chars (and friends) in list context
Message ID:
941eab8405060207597620d865@mail.gmail.com
All:
I would like to revisit the following question as there was no
decision reached AFAICT.

http://groups.google.ca/group/perl.perl6.language/browse_thread/thread/766c1b32c57a56f6/3296f0d6cad75548?q=list+context+.chars&rnum=1&hl=en#3296f0d6cad75548

What I would like to be able to do is:

my $str = 'hello';
my @chars = $str.chars; # <h e l l o>

There were some good points raised in that thread that I think are
valid, but I think it digressed from the intent of the original
question.  Perhaps that is because "unicode" prefaced chars which
clouded the waters.  I don't know anything about unicode and leaving
the hard choices for doing the "right thing" up to you all.  Whatever
the "right thing" is, will there be a way to do what my code snippet
showed?

Cheers,
Joshua Gatcomb
a.k.a. L~R

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