a common idiom is: @arr1 = map{$_||0}@arr1; this converts undef or "" to 0.
In reply to Re^2: converting strings to ints by Marshall in thread converting strings to ints by 7stud