Can someone explain to me why this is. Is the ternary operator some kind of list operator in disguise? Why does the context of shift need to be so explicit.
# WRONG! at least in 5.8.5 - context is ambiguous?
my $thing = shift ? 1: 0
#RIGHT!
$thing = shift() ? 1 : 0
if someone can point to the book that explains this, I would be greatful, otherwise it's a bug in my eyes because '?' is an operator and the interpretor upon hitting that operator as such and not a token should decipher the context of the shift.
Apr 24, 2024 at 07:44 UTC McDarren Moved from Snippets Section to SOPW