Syntactic Confectionery Delight | |
PerlMonks |
Re: How to Prepending a timestamp to each line of output from a commandby choroba (Cardinal) |
on Jun 07, 2017 at 09:18 UTC ( [id://1192256]=note: print w/replies, xml ) | Need Help?? |
prepend.pl:
Test run:
If you want to overwrite a line, don't output "\n" at its end, but use "\r" instead, it will move the cursor to the beginning of the same line. Update: See Time::HiRes , printf, and Quote and Quote like Operators.
In Section
Seekers of Perl Wisdom
|
|