$ perl -le'print defined(prototype("CORE::print")) || 0' 0
But honestly, that's not what you want anyway. What if the program also uses printf or syswrite? What if the program wants to write to a file?
You want to present the interface of a variable, but with custom functionality. That's what magic is for. Specifically, you want to tie the handle you want redirected (presumably STDOUT). See Tie::Handle
In reply to Re: print overloading
by ikegami
in thread print overloading
by Karger78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |