Problems? Is your data what you think it is? | |
PerlMonks |
Re: How to Prepending a timestamp to each line of output from a commandby Discipulus (Canon) |
on Jun 07, 2017 at 09:20 UTC ( [id://1192257]=note: print w/replies, xml ) | Need Help?? |
hello jnarayan81, First of all you are assigning to $time once, so even if the format will work you'll end with the same time at each print: you must call it at each iteration directly or with a sub. Second I do not find %a to be valid in the format description, see the following code:
L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|