timestamp in STDERR output
Matthew Lawrence
matthew.lawrence at ehsbrann.com
Fri Jun 30 11:38:23 BST 2006
> Hi Ben,
>
>
>>I'm trying to understand perl a little better here!
>>
>>could you explain why you use untie here having used the typeglob to
>>make the STDERR filehandle local to the block?
>
>
> I must admit I don't get it either as
>
> use Tie::STDERR \×tamper;
>
> sub timestamper {
> print time().': '.shift;
> }
>
> print STDERR "bla\n";
>
> works fine for me.
Ah yes, the original code printed to STDOUT, which might not be what you
really want.
Dave posted an addendum later that would (should) break the above code.
Matt
More information about the london.pm
mailing list