in reply to logic problem with perl game
1) As a starter, for those if conditions, instead of using "and", use &&. "and" has a very low precedence.
2) Your else is only paired with the last if. Chain those if's together with if/else if/else.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: logic problem with perl game
by mynameisG (Novice) on Dec 04, 2010 at 01:47 UTC | |
by PeterPeiGuo (Hermit) on Dec 04, 2010 at 01:59 UTC | |
by Anonymous Monk on Dec 04, 2010 at 03:36 UTC |