re: Sudoku

[email protected] (Quantum Mechanic)
Newsgroups perl.fwp
Message-ID <[email protected]>
1) Not strict and warnings clean.
2) perl -c on 

     if( $puzmap[$bestpos] & 1 == 0 )

gives:

     "Possible precedence problem on bitwise & operator at
sudoku_ip.pl line ..."

but this seems to be a clash between undeclared variables.

The intended precedence seems to be 

    if( ( $puzmap[$bestpos] & 1 ) == 0 )

but this gives me:

    "Whoops - bestpos is a given square at..."

Changing the precedence to 

    if( $puzmap[$bestpos] & ( 1 == 0 )

seems to generate the right answer.

Is this what you intended?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.