Perl: my $time = time; JavaScript: var now = new Date(); var epoch = now.getTime();