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.
In reply to Re^5: IO::Handle UNIVERSAL::can STDOUT print
by ikegami
in thread IO::Handle UNIVERSAL::can STDOUT print
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |