sub fix2 { my $n = shift; # must be greater or equal to this (assert >= 0) my $m = shift; # must be multiple of this (assert > 0) $n + ($m-$n)%$m; }