if ($move =~ /\b(north|south|east|west)\b/i) {I would strongly advise you to anchor that (and the quit check, too) with ^ and $ instead of \b's:
or be consistent and let my second try work since the first one did.$ perl -Mmodule Welcome to my game! Do you want to move: North? South? East? West? <120/120hps 50/50mana 100/100mvs> I am but mad north-northwest You have moved I am but mad north-northwest. Welcome to my game! Do you want to move: North? South? East? West? <120/120hps 50/50mana 100/100mvs> When the wind is southerly, I can te +ll a hawk from a handsaw That is not a valid option. Welcome to my game! Do you want to move: ...
In reply to Re: Sometimes, the simplest things will trip you up, if you forget about them
by ysth
in thread Sometimes, the simplest things will trip you up, if you forget about them
by matra555
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |