There are 3 elements in @arr2 $arr2[2] is undefined