Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Finding the total number of elements in an array.

by dempa (Friar)
on Jul 19, 2000 at 15:46 UTC ( [id://23164]=note: print w/replies, xml ) Need Help??


in reply to Finding the total number of elements in an array.

In scalar context, the array returns the number of elements.
my @colors = qw/red green blue cyan/; print "I have " . scalar @colors . " colors\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-29 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found