Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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.

Comment on Re: comparison of character

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044553]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2015-10-13 17:21 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (311 votes), past polls