in reply to Fun with two-dimensional arrays
I would say do it the C way... (ish)
It works, and you always know your coordinates... you might want to define 21 and 79 as variables at the top of the program, though... in case screen size changes... or dofor my $x (0..21) { for my $y (0..79) { do_stuff($vscr[$x][$y]); } }
for my $x (0..$#vscr) { for my $y (0..$#{$vscr[$x]}) { do_stuff($vscr[$x][$y]); } }
- Ant
- Some of my best work - Fish Dinner
In Section
Seekers of Perl Wisdom