sub divmod(Int $a, Int $b) { $a div $b, $a mod $b; } my ($a, $b) = divmod(5, 3); $a == 1 or die "Wrong value"; $b == 2 or die "Wrong value";