laziness, impatience, and hubris | |
PerlMonks |
Re: While loopby mephit (Scribe) |
on May 14, 2002 at 19:59 UTC ( [id://166563]=note: print w/replies, xml ) | Need Help?? |
That works. It'll echo every value entered, which you didn't ask for, but it will also prompt for "yes" or "no" after every 'incorrect' input. Why patterns instead of eq? Easier to customize, IMO, in case you want to allow for different case (with the /i, as above), or just allow for 'y' or 'n,' or whatever. HTH
In Section
Seekers of Perl Wisdom
|
|