Use your datetime function in place of localtime:
$text = "the\nquick\nbrown\nfox\n";; $text = join "\n", map{ localtime()." $_" } split "\n", $text;; print $text;; Tue May 21 10:42:09 2013 the Tue May 21 10:42:09 2013 quick Tue May 21 10:42:09 2013 brown Tue May 21 10:42:09 2013 fox
In reply to Re: Appending time to each line
by BrowserUk
in thread Appending time to each line
by ajose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |