Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Counting number of characters in a string

by Anonymous Monk
on Mar 13, 2001 at 01:49 UTC ( #63981=note: print w/replies, xml ) Need Help??


in reply to Counting number of characters in a string

@arrayToReceiveChars = split(//,$varHoldingString); $len = @arrayToReceiveChars; print $len;
  • Comment on Re: Counting number of characters in a string

Replies are listed 'Best First'.
Re^2: Counting number of characters in a string
by Anonymous Monk on Nov 19, 2009 at 16:45 UTC
    if you're not in a subroutine, doing a split in scalar context: $length=split(//, $string) acheives the same thing. Don't do this in a subroutine though, or else you'll clobber your @_.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://63981]
help
Chatterbox?
[Discipulus]: .. yes erix until NodeReaper put jhon coltrane again
[erix]: nice cover with the spitting image of George (and a great solo by Prince at the end )
[Discipulus]: good night monks! i feel fresh as the turkey in the hoven but i need to sleep
[planetscape]: gobble, gobble, Discipulus!
[erix]: Discipulus: buonanotte! :)
[stonecolddevin]: man we need a new guitar legend
[stonecolddevin]: Clapton has issues playing nowadays
[stonecolddevin]: Prince is gone
[stonecolddevin]: Van Halen is still around but I haven't heard any of their new stuff
[erix]: oh, 41M views -- everyone has seen it already then :)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-06-22 21:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.