in reply to Re: IO::Handle UNIVERSAL::can STDOUT print
in thread IO::Handle UNIVERSAL::can STDOUT print

use IO::Handle; STDOUT->print("printing works\n"); __END__ printing works

Replies are listed 'Best First'.
Re^3: IO::Handle UNIVERSAL::can STDOUT print
by ikegami (Patriarch) on Sep 04, 2009 at 06:25 UTC
    What about it?
      print works, but can('print') returns undef

        IO::Handle::can is called with *STDOUT as the first argument just like IO::Handle::print is called with *STDOUT as the first argument. Seeing as *STDOUT isn't an object, can returns false as documented.

        It wouldn't hurt for IO::Handle to override can to handle this better, though.