foreach i (1....n) { foreach j (1,2) { $object_name = @list_of_values[i][2]; } };