in reply to Re: Perl's Bad Ideas
in thread Perl's Bad Ideas
If there were a comma after the filehandle, then what would this do? print $x, $y; Are you printing the contents of $y to filehandle $x? Or are you printing the contents of $x and $y to stdout?If $x is a filehandle, of course I am printing contents of $y to filehandle $x.
Your other alternative is a non-alternative. If $x is a filehandle, print $x, $y; doesn't print contents of $x and $y to STDOUT, it generates error 'No comma allowed after filehandle...'.
So if it's not really a choice, why not 'do the right thing'.
If Perl is smart enough to know it's a filehandle, why isn't it smart enough to use it as such?
YuckFoo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl's Bad Ideas
by Dominus (Parson) on Apr 07, 2002 at 00:00 UTC | |
by belg4mit (Prior) on Apr 07, 2002 at 00:10 UTC | |
by Dominus (Parson) on Apr 07, 2002 at 00:30 UTC | |
by belg4mit (Prior) on Apr 07, 2002 at 00:41 UTC | |
by Dominus (Parson) on Apr 07, 2002 at 00:56 UTC |