in reply to Array remains empty
You haven't put any values into @xco or @yco so how can you expect the loops to do anything?
Added: Once you fix that, you'll find a logic error. ;-)