in reply to Re^2: Printing an array using while loop
in thread Printing an array using while loop

Right, the correct solution checks @array, not the returned item.