I think line 22 just refers to the start of the if chain. This is start of your problem:
elsif ($dungeon[$start] eq '#' && $dungeon[$start] + 1 eq '#'
You probably want to do the "+1" inside the brackets.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re: Writing a random dungeon generator in perl.
by xdg
in thread Writing a random dungeon generator in perl.
by Trag
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |