in reply to Conditional Operator Confusion
You may like:
for(1..10){ $x= $_ > 5 && 'foo' || 'bar'; print "$_:$x\n"; } [download]
instead. Update: You may like:
print"$_:${[$_>5&&'foo'||'bar']}[0]\n"for 1..10; [download]
even better.