|
|
| more useful options | |
| PerlMonks |
Re^5: Split output by tabsby Anonymous Monk |
| on Nov 13, 2012 at 13:45 UTC ( #1003611=note: print w/ replies, xml ) | Need Help?? |
|
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. How does it add clarity or reduce the number or rules?
print FILEHANDLE LIST print FILEHANDLE print LIST
print { EXPR } LIST is not on the list at all Where is the ambiguity?
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. They're both called filehandles, both STDOUT and $fh, the first argument to print is always an optional filehandle followed by a LIST STDOUT is a bareword filehandle and $fh is a lexical-scalar filehandle
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||