http://www.perlmonks.org?node_id=518480


in reply to Re: Append the timestamp before and after the data in the logfile
in thread Append the timestamp before and after the data in the logfile

To save some typing, you can group the commands together in a subshell and redirect the subshell's output instead.

( date; perl test.pl; date ) > test.log

    --k.