http://www.perlmonks.org?node_id=83215


in reply to Preventing BEGIN blocks from being run in the debugger?

You best bet may actually be to have your own begin block that copies STDOUT to another handle, and then close the normal STDOUT. You can then print to your special STDOUT handle and none of the other begin blocks will have a chance (I hope?) to mess up your output.

correct me if i'm wrong....this is a stab in the dark...