Hi Everyone,
($total+=$_) for @record;
assume @record=(1,2,3), so the result is 6.
if @record=("1 3","2 3","3 3"), would like to sum up the 2nd field of this array, the result is 9.
i tried " ($total+=$[2]) for @record ", cannot, please advice.
Thanks
---------- Post updated at 03:45 AM ---------- Previous update was at 03:38 AM ----------
err, i think i still use back the for loop to complete this task.