in reply to Re: curly braces around a lexical file handle
in thread curly braces around a lexical file handle
The additional curlies add "visual weight", one sees immediately that
print $a, $b; # and print { $a } $b;
do different things.
I don't usually use the curlies, but that's more a result from laziness and thoughtlessness than anything else.
I kinda like the Perl 6 way of doing it:
print $a, $b; # print both variables $a.print: $b; # treat $a as a file handle
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: curly braces around a lexical file handle
by ikegami (Patriarch) on May 31, 2010 at 16:49 UTC | |
by moritz (Cardinal) on May 31, 2010 at 16:54 UTC | |
by ikegami (Patriarch) on May 31, 2010 at 17:31 UTC | |
by moritz (Cardinal) on May 31, 2010 at 17:51 UTC | |
by ikegami (Patriarch) on May 31, 2010 at 18:07 UTC | |
| |
|
Re^3: curly braces around a lexical file handle
by JavaFan (Canon) on May 31, 2010 at 10:38 UTC | |
by moritz (Cardinal) on May 31, 2010 at 13:08 UTC | |
by ikegami (Patriarch) on May 31, 2010 at 17:00 UTC |