Re: Strange interaction between print and the ternary conditional operatorby kcott (Bishop)
|on Feb 20, 2020 at 07:22 UTC||Need Help??|
Welcome to the Monastery.
When in doubt, it's often a good idea to find out how Perl is seeing your code with B::Deparse.
"Why isn't " bar" getting appended to the output in the second case?"
Because it's getting appended to the return value from print.
Of course, you should start all your code with:
In this case, you would have received warnings:
See "perlintro: Safety net".