in reply to Converting Seconds to Nice Format

Similar to davorg's response, this also works:
sub mymod ($$\$\$) { my ($a, $b, $divref, $remref) = @_; $$remref = $a % $b; $$divref = ($a - $$remref)/$b; } my ($secs, $days, $hours, $mins); $secs = 1_000_000; &mymod($secs, 86_400, \$days, \$secs); &mymod($secs, 3_600, \$hours, \$secs); &mymod($secs, 60, \$mins, \$secs); print "$days days $hours hours $mins minutes and $secs seconds.\n";

It's not really shorter, but I like using

%
:)