In Perl, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In Perl, to nicely print a new line to STDOUT, you can use the “say” feature which “Just like print, but implicitly appends a newline”: […]
In Perl, how to get the epoch timestamp, the number of seconds passed since the epoch? In Perl, to get the epoch time, call the time function: my $ts = time Example: $ perl -e ‘print time . “n”‘ 1491473202 Answered by dtivl.