sub permutation { my ($prob, $start) = (1, shift); $prob *= $start-- foreach (1 .. $_[0]); $prob; }