Brute force sudoku generation in perl