Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Not trying to do anything "useful" here, just experimenting with Perl a bit. I read in Intermediate Perl (p. 146) that the print function (as well as many of the built-in operations on filehandles) are actually just using Perl's indirect object notation to call the print method on the filehandle object.
So, I was curious to see whether this worked with the standard filehandles; STDOUT in particular. However:
didn't work. Nor did:
or even (not that I expected this to):
So, what gives? I checked perlfaq5, IO::Handle, and perldata but didn't see anything that answered my question specifically. Is there something I'm doing wrong or are the STD* filehandles "special" in some way? Update: Thanks, all! In reply to Regarding STDOUT and indirect object notation for print by romandas
|
|