sub p{ @m=1; # Start the product at 1. for$p(@_){ # Loop over the polynomials. my@t; # Create a private temp array. for$i(0..@m){ # Loop over the indexes of @m. my$j; # Create the *other* index var. $t[$i+$j++]+= # Manually increment $j while.. # Adding to the index of @t.. $_*$m[$i] # 2 terms multiplied together.. for@$p # for all the terms in the.. } # other polynomial. @m=@t # Make the temp array our new } # product. [@m] # Return our answer in the } # desired form.