Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Counting number of characters in a string

by OeufMayo (Curate)
on Mar 13, 2001 at 02:40 UTC ( #64000=note: print w/replies, xml ) Need Help??


in reply to Counting number of characters in a string

Yet Another (stupid) Way To Do It:

$string = "foobar"; $count = $string =~ s/(.)/$1/sg;
<kbd>--
my $OeufMayo = new PerlMonger::Paris({http => 'paris.mongueurs.net'});</kbd>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://64000]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2018-07-21 19:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (450 votes). Check out past polls.

    Notices?