Hello ikegami,
Interestingly, this particular warning goes away if the print command is terminated by a semicolon:
15:54 >perl -wle "print ((1))" print (...) interpreted as function at -e line 1. 1 15:54 >perl -wle "print ((1));" 1 15:54 >
I get the same behaviour on my various Strawberry Perls, which range from 5.14.4 to 5.22.0.
Seems to be another (strange) heuristic employed by the warnings pragma.
Update: Changed wording of first paragraph (underlined words) to clarify that my comment applies only to cases like ikegami’s example, in which “the statement completed by the semicolon is a complete and unambiguously correct print statement” (BrowserUk, below). See also my earlier post: Re^3: false warning: print (...) interpreted as function.
Cheers,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^5: false warning: print (...) interpreted as function
by Athanasius
in thread false warning: print (...) interpreted as function
by rsFalse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |