|The stupid question is the question not asked|
Silly While Loop Problemsby gsus (Initiate)
|on Sep 30, 2011 at 17:39 UTC||Need Help??|
gsus has asked for the
wisdom of the Perl Monks concerning the following question:
Evening Perl Monks
I have a really simple requirement on a project that i'm working on at home which requires what i believe is a while loop. In it's most simple form, i want to prompt a user running a script to enter either Y or N to continue or abort the script.
Below is what i thought might work, oh and i have this in a subroutine.
When my program calls this sub routine, no matter what i enter in for the variable $yn it never tests TRUE in the while loop and just continues to prompt me with my Invalid Option message.
Sorry i should have mentioned that once i've gone through the loop i'll have an if statement to either exit and abort the program or just drop out of the sub routine and continue processing.