From: Mathieu Bouchard Date: 2001-06-19T03:20:09+09:00 Subject: [ruby-talk:16596] Re: Two (or more) dimensional arrays? On Tue, 19 Jun 2001, Kirk Lowery wrote: > > > > irb(main):001:0> a = [[1,2,3],[4,5,6]] > > [[1, 2, 3], [4, 5, 6]] > > irb(main):002:0> a[0][2] > > 3 > > > Of course! That is what is so attractive about Ruby. Simple and elegant. > It's going to take this old Perl Hacker Wannabe a while to adjust, but > it's things like this which really encourages me to learn and use Ruby. it's easier even to do it in Perl, because accessing arrays and hashes that don't exist creates those (auto-vivification). Now the advantage about Ruby is that in *most* *other* *cases* it's shorter, simpler and more elegant ;-) matju