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

Re^2: Conditional Operator Confusion

by Melly (Hermit)
on Nov 29, 2006 at 12:39 UTC ( #586675=note: print w/ replies, xml ) Need Help??


in reply to Re: Conditional Operator Confusion
in thread Conditional Operator Confusion

Well, pfft - that's no good for golf... although I'm still confused - how does precedence work in this context?

Tom Melly, pm@tomandlu.co.uk


Comment on Re^2: Conditional Operator Confusion
Re^3: Conditional Operator Confusion
by Anonymous Monk on Nov 29, 2006 at 12:56 UTC
    ??
    C:\>perl -MO=Deparse,-p for(1..10){ $_>5 ? $x='foo' : $x='bar'; print "$_:$x\n"; } ^Z foreach $_ (1 .. 10) { ((($_ > 5) ? ($x = 'foo') : $x) = 'bar'); print("${_}:$x\n"); } - syntax OK

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (16)
As of 2014-07-14 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (261 votes), past polls