Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Strange interaction between print and the ternary conditional operator

by jwkrahn (Abbot)
on Feb 20, 2020 at 07:20 UTC ( [id://11113229]=note: print w/replies, xml ) Need Help??


in reply to Strange interaction between print and the ternary conditional operator

Also, try it with commas instead of concatenation and you won't need parentheses and you won't have this problem:

print 'foo, ', 1 ? 'yes' : 'no', ' bar';
print 1 ? 'yes' : 'no', ' bar';

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-20 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found