Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: comparison of character

by roboticus (Chancellor)
on Jul 16, 2013 at 11:14 UTC ( #1044553=note: print w/replies, xml ) Need Help??

in reply to comparison of character

Think about it a bit more: If the user enters 'X', it enters the while loop because 'X' ne 'Y', right?

If the user enters 'Y' then the first bit of your conditional fails ('Y' eq 'Y') so it continues to the next bit--but 'Y' ne 'y' so the conditional is satisfied anyway.

Any character you enter will satisfy one of the parts of your while condition. I suggest you think about your logic AND change the conditional to make it do what you want. ;^)


When your only tool is a hammer, all problems look like your thumb.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044553]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2018-03-17 16:40 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (224 votes). Check out past polls.