perl -MO=Deparse -eanother -ejust -ehacker -eperl

Replies are listed 'Best First'.
Re: Indirected Japh
by jdalbec (Deacon) on Sep 02, 2004 at 02:09 UTC
    ++educational (for me, anyway)
    man perlobj /Indirect Object Syntax
    so print STDERR is really STDERR->print? Wow.
      Well, almost. STDERR is a filehandle, so direct method invocation syntax is not available to STDERR. While the print FILEHANDLE syntax looks like indirect object syntax, it is really just its own special case. Filehandles are not blessed object references (excepting IO::Handle objects), so you cannot invoke any methods on them.
        ...direct method invocation syntax is not available to STDERR.

        This works for me:

        use IO::Handle; STDERR->print("Hello world\n");