Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
P is for Practical
 
PerlMonks  

Re: number of rows in double dimension array

by hdb (Parson)
on Jul 24, 2013 at 09:50 UTC ( #1046042=note: print w/ replies, xml ) Need Help??


in reply to number of rows in double dimension array

A two-dimensional array in Perl usually is an array of array references, so the number of rows is just the number of elements in the "outer" array:

my @dd = ( [ 11, 12, 13], [ 21, 22, 23], [ 31, 32, 33], [41, 42, 43], +); print "Number of rows: ", scalar @dd, "\n";


Comment on Re: number of rows in double dimension array
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2014-04-18 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (465 votes), past polls