in reply to How do I redirect STDERR to a subroutine?

tie *STDERR,'MyRandomPackageName'; package MyRandomPackageName; sub TIEHANDLE { bless {}; } sub PRINT { CORE::print(@_); } sub PRINTF{ CORE::print(sprintf@_); } #etc

Replies are listed 'Best First'.
Re: Re: How do I redirect STDERR to a subroutine?
by blue_cowdawg (Monsignor) on Feb 18, 2004 at 02:26 UTC

    Errmm... I tried running that and it went into an infinite loop.... I haven't tried a debugger yet, but...


    Peter L. Berghold -- Unix Professional
    Peter at Berghold dot Net
       Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice.