ping 192.168.2.1 | perl -nle 'print scalar(localtime), " ", $_

with file redirect:
ping 192.168.2.1 | perl -nle 'BEGIN {$|++} print scalar(localtime), " ", $_' >/tmp/log

computer2know :: thank you for your visit :: have a nice day :: © 2018