Skip to content

Instantly share code, notes, and snippets.

@djanatyn
Created July 17, 2011 20:19
Show Gist options
  • Save djanatyn/1088017 to your computer and use it in GitHub Desktop.
Save djanatyn/1088017 to your computer and use it in GitHub Desktop.
arrays are weird
my @map = (
['#','#','#','#','#'],
['#','.','.','.','#'].
['#','.','.','.','#'].
['#','.','.','.','#'].
['#','.','.','.','#'].
['#','#','#','#','#']);
for(my $y, $y < 5; $y++;) {
for(my $x, $x < 4; $x++;) {
addch($y,$x,@map[$y][$x]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment