sub factorial { my ($f,$n) = (1,shift); $f *= $n-- while( $n ); $f; }