http://www.perlmonks.org?node_id=83184


in reply to Re: Golf: Selection from sets (Choose)
in thread Golf: Selection from sets (Choose)

It is usual when counting helper subroutines to count the declaration of the helper in the overall length. So your code is of length 60.

Incidentally here is another reasonably efficient one to compute of length 53. Mainly interesting because it works on a different principle.

sub c{ my@c=1;map$c[$_]+=$c[$_-1],1..$_[1]for 1..$_[0];pop@c }