Moreover, you can include the first reading of the input into the loop as well:
print "Do you wish to update (Y/N)?\n"; my $choice = q(); while ('y' ne lc $choice and 'n' ne lc $choice) { chomp($choice = <>); }
In reply to Re: comparison of character
by choroba
in thread comparison of character
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |