(my $m_time) = (stat($source_path))[9]; my ($i_wday, $i_month, $day, $year) = (localtime($m_time))[6,4,3,5]; #### #remember for timegm month[0-11] and year is delta from 1900 my $time = timegm(0,$minutes,$hours,$days,$month-1,$year-1900); print "epoch seconds $time\n";