Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Counting the number of items returned by split without using a named array

by blazar (Canon)
on May 03, 2006 at 10:50 UTC ( [id://547114]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $count=map $_, split;
    
  2. or download this
    my $count=+(split);  # ?!?
    
  3. or download this
    $ perl -lpe '$_=+(split)'
    foo
    1
    bar baz
    2
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://547114]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-24 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found