I thought the above example was equivalent to:perl -e '$x="\nYo "; print ($x ? $x.="hello" : $x.="Bye");'
which correctly prints "Yo hello". Any thoughts?perl -e '$x="\nYo "; if ($x) {print $x."hello";} else {print $x."Bye" +;}'
In reply to ?: (conditional operator) by pmc2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |