in reply to Useless use of string in return statement
I get:
Possible precedence issue with control flow operator at noname.pl line + 23. Useless use of string in void context at noname.pl line 23.
for the return $result{'message'} ... line, which makes sense. Remember or is low precedence so the compiler sees:
(return $result{'message'}) or "$result{'api-key'}:$result{'session'}" +;
High precedence || would fix the problem
Update: note that I'm using Perl v5.32.0.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Useless use of string in return statement
by syphilis (Archbishop) on Apr 13, 2021 at 09:40 UTC |