There is randomness involved because 1 value of $A is a guess. The objective is to choose a pair of guesses A and B which minimize the error term. Also, will declaring the variables with my get around the scalar property of $? Thanks for the tip about the warnings.