in reply to greatest common factor
Very elegantly done. BTW, there's a typo in the sub multigcf: gcd should be gcf! Otherwise, a very nice offering.
-zeno
sub multigcf { my $x = shift; $x = gcd($x, shift) while @_; #should be gcf! return $x; }
In Section
Cool Uses for Perl