good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Text Based Perl Gameby smls (Friar) |
on Dec 19, 2013 at 14:56 UTC ( [id://1067827]=note: print w/replies, xml ) | Need Help?? |
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:
This would prevent the call stack from growing. (See the last two paragraphs of goto for more info.)
In Section
Cool Uses for Perl
|
|