in reply to unix timestamp

POSIX is another core module you can use. Its strftime function will do what you want:

use POSIX 'strftime'; + my $timestamp= strftime( '%s' => localtime() );

See perldoc -f localtime, POSIX::strftime, and strftime(3).

--sacked