But can someone tell me why I can't multiply each element in an array with the folliwing (I'm getting the error message Use of uninitialized value in multiplication (*)):for (@even){ $sum += $_; }
Thanks,for (@odd){ $sum2 *= $_; }
In reply to Adding and Multplying Elements in an Array by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |