Perl Best Practices #136: Always put filehandles in braces within any print statement. It is easier to read, helps you not to write a comma, and you do not have to remember when to use braces and when not.

Perl Best Practices #136: Always put filehandles in braces within any print statement. It is easier to read, helps you not to write a comma, and you do not have to remember when to use braces and when not.

Excellent example of a bogus "best practice", thank you: it is always better to know when to use curlies, and when not.

I disagree as to the bogosity of this practice.
There is nothing wrong with adding clarity to a statement that may otherwise be confusing or ambiguous. And there is nothing wrong with reducing the number of rules someone needs to know in order to correctly decipher a statement.

This is just such a case, because an argument given to print can start with either a filehandle or a variable. Depending on what follows, it can be very hard to tell which is intended without braces.

I do enjoy how Perl lets one push the boundaries of acceptable syntax, but that doesn't mean it's always a good idea to do so. That's just my opinion, of course.