in reply to Indirect Japh

++educational (for me, anyway)
man perlobj /Indirect Object Syntax
so print STDERR is really STDERR->print? Wow.

Replies are listed 'Best First'.
Re^2: Indirected Japh
by Pragma (Scribe) on Sep 02, 2004 at 03:18 UTC
    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");
        Which is why I said:
        ... (excepting IO::Handle objects)