in reply to How can I tell at run time that my script is writing to STDERR?

Many thanks.

I've tested both solutions. Note that zigdon's solution will trap warnings issued by included modules, whereas rir's solution will only affect calls to warn within the package where the sub is declared.

  • Comment on Re: How can I tell at run time that my script is writing to STDERR?
  • Download Code