I just send the following letter to p5p:
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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.