in reply to [untitled node, ID 216639]

Why not use an array of arrays to represent the board?

my(@board,$row,$col,$max_row,$max_col); $max_row = $max_col = 7; for($row=0;$row<$max_row;$row++) { $board[$row] = []; for($col=0;$col<$max_col;$col++) { # Fill out a square ${$board[$row]}[$col] = ??; } }

The extra complexity of dealing with the nested array structures will be more than made up by the simplification of access. Indead the next level would be to create an object to represent the board and have methods for getting and setting individual cells.

Use pack to convert the numeric column indexes into letters.