Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm still confused about the use case....
If this is only for debugging purpose to find the line numbers , you can close STDOUT and STDERR and cause warnings. But the string to be printed will be lost.
Otherwise I concur with Corion to tie a filehandle. caller will tell you where the tied method was called and you can redirect STDOUT and STDERR to these FHs. (also with select )
Cheers Rolf
In reply to Re: Override printing to STDOUT/ERR
by LanX
|
|