in reply to Re: Text Based Perl Game
in thread Text Based Perl Game
The biggest item I'd like to point out is that your flow control is flawed. You're using subroutines to call themselves and each other without ever returning, causing the stack to get deeper and deeper. I'd suggest instead that you have a control loop like this: [...]
Another solution would be to call the non-returning subs like this:
goto &hallwayCommand;
This would prevent the call stack from growing. (See the last two paragraphs of goto for more info.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Text Based Perl Game
by roboticus (Chancellor) on Dec 19, 2013 at 15:41 UTC |