my $time = time(); my $time_l = $time & 0x1ff; my $time_h = ($time >> 9); # n > 7 and n mod 3 == 0 $time_h *= 125; $time_l *= 125; # 1000 = 2^3 * 5^3 printf "x %x%03x\n", $time_h + ($time_l >> 9), ($time_l & 0x1ff) << 3;