Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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 avoiding work at the Monastery: (16)
As of 2015-11-30 17:40 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (778 votes), past polls