foreach $var (@nums) { $sum = $sum + $var; } #this is to add the numbers together. Sum is empty, so with every new +number #that occurs it goes into sum and adds to whatever number is i +n var. i hope I'm #explaining that right.