in reply to Re: SuDoKu solver
in thread SuDoKu solver


I initially wrote this and it appeared correct according to Test::More::is_deeply(). However, despite the test, it is wrong since the inner array ref is copied rather than recreated (which is probably what you are alluding to above).
my $grid = [([($init) x 9]) x 9]; # ! wrong

So, perhaps somethings like this:

my $grid = [map {[($init) x 9]} 1..9];

I was really addicted to Sudoku puzzles a few weeks ago, but I'm finally getting my life back. :-)

--
John.