timestamp in STDERR output

David Cantrell david at cantrell.org.uk
Fri Jun 30 12:40:46 BST 2006


On Fri, Jun 30, 2006 at 11:32:59AM +0200, Thomas Busch wrote:

> I must admit I don't get it either as
> 
> use Tie::STDERR \&timestamper;
> 
> sub timestamper {
>     print time().': '.shift;
> }
> 
> print STDERR "bla\n";
> 
> works fine for me.

That's because you're printing to STDOUT.  I should have written:

    print STDERR time()....

-- 
David Cantrell | A machine for turning tea into grumpiness

    If you have received this email in error, please add some nutmeg
    and egg whites, whisk, and place in a warm oven for 40 minutes.


More information about the london.pm mailing list