It uses DateTime to generate the timestamp but changing it to use localtime should be pretty simple.select STDOUT; $| = 1; unless (open STDOUT, "|-") { eval { while(<>) { my $now = DateTime->now; print "$now: $_"; } }; exit(0); }
In reply to Re: Append the timestamp before and after the data in the logfile
by salva
in thread Append the timestamp before and after the data in the logfile
by kulls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |