@a= <>; #### @a= <>; foreach (@a) { $total += $_; ++$count; } print "total of $count items is $total\n"; #### 1 2 5 6 ^Z total of 4 items is 14