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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044553]
[erix]: Leasure Suit L.
[LanX]: THEY are restricting your Internet?
[LanX]: join the fight brother
[Eily]: probably because I'm an underpriviledged millenial
[LanX]: oh

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-03-23 17:48 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (292 votes). Check out past polls.