You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is this is not an "assignment statement", despite what it looks like to you knowing what your intent was; it is a statement with 3 expressions each executed in void context, one of which is an assignment. For instance, this is perfectly valid and extremely common, and the only difference is that the expressions are executed in list context: foo(my $x = 42, $y, $z)
I wrote about this on StackOverflow when I observed it didn't generate a warning. This is the code,
I found the underlying problem easily. But I think it may just be an oversight that it doesn't generate a warning. Seems pretty silly not to anyway.
https://stackoverflow.com/questions/78577874/why-are-functions-allowed-in-void-context-in-assignment-statements
The text was updated successfully, but these errors were encountered: