This is a plea to remove the 'print (...) interpreted as function' warning. Let's look at the rational for this warning. It's to warn programmers that if they write: print (3 + 4) * 2; Perl adds 3 and 4, calls print with the result as argument, and multip +lies the result of the print with 2. Fair and square, but this unintentiona +l parsing can happen with all functions taking a list as argument, not j +ust print. However, only 'print' and 'printf' can have this warning trigge +red, with other functions are save. But it gets more special. The warning is only triggered if there is exactly one space between 'print' and the opening parenthesis. print(3 + 4) * 2; # No 'interpreted as function' warning. print (3 + 4) * 2; # 'interpreted as function' warning. print (3 + 4) * 2; # No 'interpreted as function' warning. The disadvantage of this warning is that it is also triggered at perfectly valid code like: print (3); Therefore, I suggest we remove this warning, specially since code like +: print (3 + 4) * 2; already issues a warning "Useless use of multiplication (*) in void co +ntext", regardless of the amount of whitespace between 'print' and the opening parenthesis.
Abigail
In reply to print (...) interpreted as function by Abigail-II
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |