David92 has asked for the wisdom of the Perl Monks concerning the following question:
I have created a matrix with array in an array method:
@myMatrix = ( [$value1,$value2,$value3], [$value4,$value5,$value6]);
I'd like to get this Matrix's size. With:
$matrixSize = @myMatrix;I get a values of 3 - which means he counts only the first row. So if anyone knows how to get the matrix size would be awesome!
Please, let the answer be general - my matrix changes depending on how many variables will be in my Hash. So do not just focus on this example, I need something like "getMatrixsize" function. :)
Wish you all a great day, David
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get Matrix Size
by hippo (Archbishop) on Jul 18, 2014 at 09:36 UTC | |
|
Re: How to get Matrix Size
by AppleFritter (Vicar) on Jul 18, 2014 at 09:46 UTC | |
|
Re: How to get Matrix Size
by Anonymous Monk on Jul 18, 2014 at 08:52 UTC | |
|
Re: How to get Matrix Size
by David92 (Sexton) on Jul 18, 2014 at 09:51 UTC |