Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re(2): Fun with two-dimensional arraysby FoxtrotUniform (Prior) |
on Aug 09, 2001 at 21:14 UTC ( [id://103512]=note: print w/replies, xml ) | Need Help?? |
I guess I obscured my question with too much detail about the problem. I'm asking mostly to satisfy my curiosity. Without all the $vscrbaggage, my question is: given an array of arrays (of arbitrary dimensions), how do you hit every element, first visiting the first element in each array, then the second, and so on? For instance, if you had: you'd want to visit in the order 1, 4, 7, 2, 5, 8, 3, 6, 9. Did that make sense? update: why @ (in scalar context) and $# didn't occur to me when I posted this, I don't know. That said, mapcar is damn cool.
In Section
Seekers of Perl Wisdom
|
|