my $secs = time() % 86400; my $mins = int($secs / 60); my $hours = int($mins / 60); ($mins, $secs) »%= 60; my $time = sprintf("%02u:%02u:%02u", $hour, $min, $secs);