Perl Class feedback : Lowercase filehandles

Beatnik on 2006-04-27T08:41:58

One of the things that popped up during yesterdays' perl class was the fact that STDIN is treated the same as stdin. For other filehandles, that's ofcourse not the case. I'm sure that's documented somewhere but I'm too lazy to check.


Perl Class feedback : Lowercase filehandles

kid51 on 2006-04-28T12:13:00

Which Perl class? And what do you mean by "treated" in this context?

Re:Perl Class feedback : Lowercase filehandles

Beatnik on 2006-04-28T13:32:57

The perl class I tought a few days ago. I mean that
$ perl -le'$f = <stdin>; print $f'
bla
bla
does exactly the same as
$ perl -le'$f = <STDIN>; print $f'
bla
bla
while a similar situation with a true filehandle doesn't work.

Re:Perl Class feedback : Lowercase filehandles

merlyn on 2006-05-01T19:42:39

in the Very Old Days of Perl, it was "stdin", "stdout", and "stderr". When you use these names in the main package, Perl pretends you wrote "STDIN", "STDOUT", or "STDERR", for backward compatibility.