in reply to Redefining print

One way to do it is to tie a handle.
Example implementation at http://plp.juerd.nl/files/plp-current/plptie.pm (has several packages, so look for TIEHANDLE).

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$