websterling has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to learn a bit of Perl 6/Pugs by writing some code to solve the types of problems I routinely use Perl 5 for. Every now and then I run into a situation where it seems to me that Perl 6 tries to make a simple thing impossible.
This is one of those situations. What is the simplest way to get the length of a string? Google doesn't seem to know a simple way and I haven't stumbled across one while playing around in Pugs.
I've thought of some rather creative ways to do it, but it's hard to believe that length isn't included in the language.
Any insight is appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Length of a string in Perl6
by lidden (Curate) on Aug 21, 2008 at 16:55 UTC | |
by jethro (Monsignor) on Aug 21, 2008 at 17:09 UTC | |
by moritz (Cardinal) on Aug 21, 2008 at 17:50 UTC | |
|
Re: Length of a string in Perl6
by moritz (Cardinal) on Aug 21, 2008 at 17:22 UTC |