flounder has asked for the wisdom of the Perl Monks concerning the following question:
current_size is the number of bits, and current_case is a space separated string containing all of the case values in binary format. Thanks in advance for your help!for $j (0..((2**$current_size) - 1)) { $found = 0; @final_values = split(/[\s|\t]+/, $current_case); foreach $statement (@final_values) { if (bintodec($statement) == $j) {$found = 1;} } if (!$found){$missed_one = 1;} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparison effeciency
by Masem (Monsignor) on Apr 05, 2001 at 04:47 UTC | |
by flounder (Novice) on Apr 05, 2001 at 05:07 UTC | |
by Masem (Monsignor) on Apr 05, 2001 at 05:14 UTC | |
|
Re: Comparison effeciency
by chromatic (Archbishop) on Apr 05, 2001 at 04:48 UTC | |
|
Re: Comparison effeciency
by domo (Initiate) on Apr 05, 2001 at 15:05 UTC |