you could use the slice method to get a single column, which you can then index with [0] or whatever.
The other option is to subclass Math::Matrix, and add an access method.
"As you get older three things happen. The first is your memory goes, and I can't remember the other two... "
- Sir Norman Wisdom
| [reply] |
Slice didn't do what I'd expected; in particular, the result from above was after I'd taken the slice. Frankly, subclassing someone else's class is too much work (although an accessor that pulls out a particular element of the matrix would make sense). The next comment, however, gave me the cleaner answer I was looking for -- the reference ->[0][0].
| [reply] |
I've never used Math::Matrix myself... but if you can get at
the desired value using ${${$variable}[0]}[0], you should also
be able to use the more compact and easier to read syntax
$variable->[0][0]
| [reply] [d/l] [select] |