Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You need to change your logic such that the "does not match" message is printed AFTER the WHILE loop completes.
This means, you need a flag inside the while loop that determines whether or not a match was found.
Typically, this would be something like a $match_count, which initializes to zero, and is incremented on each match. At the end of the loop, if it is still zero, you print the message. "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest." -Confucius In reply to Re: Checking username and password but cant break whileloop!
by NetWallah
|
|