- or download this
sub p{
@m=1;for$p(@_){my@t;for$i(0..@m){my$j;$t[$i+$j++]+=$_*$m[$i]for@$p}@m=
+@t}[@m]
}
- or download this
sub p{
@m=1;for$p(@_){my@t;for$i(0..$#m){my$j;$t[$i+$j++]+=$_*$m[$i]for@$p}@m
+=@t}[@m]
}
- or download this
sub p{
@m=1; # Start the product at 1.
...
} # product.
[@m] # Return our answer in the
} # desired form.
- or download this
sub p{
@m=1;for$p(@_){my@t;for$i(0..@m){$j=$i;$t[$j++]+=$_*$m[$i]for@$p}@m=@t
+}[@m]
}
- or download this
sub p{
@m=1;for$p(@_){$i=my@t;for$,(@m){$j=$i++;$t[$j++]+=$_*$,for@$p}@m=@t}[
+@m]
}