You mean #!/usr/bin/perl
Do {You mean do {
if ($response eq 'yes' || 'Yes' || 'YES' || 'y') { $answer = $answer + 1;
The or operators just don't work that way. You should write lc $response eq 'yes' or lc $response eq 'y' instead.
Furthermore, I don't see why you are incrementing $answer when you could just say $answer = 1
In reply to Re: User input check 'Do until' loop
by Anonymous Monk
in thread User input check 'Do until' loop
by Ahten
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |