in reply to How to output matrix data from Math:;MatrixReal into a Hash or an Array

Since you are dealing with an object, you should use the methods provided by your class to retrieve the values that you need (as suggested by davido in his post). If it were a reference to a simple AoA (not a blessed object), then you could have something like this:
$perl -e ' > use strict; > use warnings; > > > my $mref = [ [ '5', '4', '4', '2', '4' ], > my $mref = [ > [ '5', '4', '4', '2', '4' ], > [ '9', '6', '4', '4', '3' ], > [ '2','73','96', '6', '8' ], > [ '2', '4', '9','87', '8' ], > [ '2', '4','10', '6', '8' ], > ]; > > for my $rows (@$mref) { > local $" = "\t"; > print "@$rows \n"; > } > ' 5 4 4 2 4 9 6 4 4 3 2 73 96 6 8 2 4 9 87 8 2 4 10 6 8
  • Comment on Re: How to output matrix data from Math:;MatrixReal into a Hash or an Array
  • Download Code