Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How do I find the size of an array?

by davorg (Chancellor)
on Jun 13, 2000 at 14:33 UTC ( [id://17866]=note: print w/replies, xml ) Need Help??


in reply to How do I find the size of an array?

The "value" of an array variable in any scalar context is its length. E.g.
scalar(@array)
Or
$length = @array;

Replies are listed 'Best First'.
Re: Answer: How do I find the size of an array?
by Anonymous Monk on Apr 28, 2007 at 01:17 UTC
    Either of the commands should do the job: scalar(@array); $#array Shashidhar Iddamsetty
      wrong

Log In?
Username:
Password:

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

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

    No recent polls found