Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: unexpected STDIN

by GhodMode (Pilgrim)
on Apr 30, 2011 at 14:28 UTC ( [id://902205]=note: print w/replies, xml ) Need Help??


in reply to Re^3: unexpected STDIN
in thread unexpected STDIN

+1 ... That's right.

I got the exact effect of the misplaced parentheses wrong. It will actually work if the response is 'y' because that parenthesized expression will always yield 'y'.

I might have gotten the reason for that effect right. Since 'or' is a logical operator, it evaluates the truth of the two operands. Since the first one is not an empty string, it's true, so the result of the expression is the first string, not just true like I originally stated.

--
Ghodmode
www.ghodmode.com/blog

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-19 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found