How to get the epoch timestamp in Perl?

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


$ perl -e 'print time . "n"'
Leave a Reply

Your email address will not be published. Required fields are marked *