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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re(2): Fun with two-dimensional arrays
by FoxtrotUniform (Prior) on Aug 09, 2001 at 21:07 UTC | |
by suaveant (Parson) on Aug 09, 2001 at 21:13 UTC |
In Section
Seekers of Perl Wisdom