timestamp in STDERR output

David Cantrell david at cantrell.org.uk
Thu Jun 29 15:53:39 BST 2006

On Thu, Jun 29, 2006 at 04:45:08PM +0200, Thomas Busch wrote:
> David Cantrell wrote:
> > sub timestamper {
> >     local *STDERR;
> >     untie *STDERR;
> >     print time().': '.$_[0];
> > }
> many thanks. That's exactly what I wanted. I owe you a beer.

Of course, what you *really* wanted would have said:

    print STDERR time()....

David Cantrell | London Perl Mongers Deputy Chief Heretic

  The test of the goodness of a thing is its fitness for use.  If it
  fails on this first test, no amount of ornamentation or finish will
  make it any better, it will only make it more expensive and foolish.
     -- Frank Pick, lecture to the Design and Industries Assoc, 1916

More information about the london.pm mailing list