[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Puzzle - Can you find the bug faster than I did?



>>>>> "VB" == Vicki Brown <vlb@cfcl.com> writes:

VB> The input data file looked like:

VB> g1840610        417     417     { 1-417 }       Initial 1.3
VB> HINT: The previous data values looked like this
VB> 7500123N        417     417     { 1-417 }       Initial 1.3

VB> 	    if (($field1 == $prev_clone) || ($i == 1)) {

VB> Do you see the bug?

The changed data made the problem obvious.

VB> (When I found it, it took me much too long to see it, considering)

Well, it is always that way.

I've gotten into the habit of not using == on keyed data. Unless the data
is really numbers.

Your description of the purpose doesn't seem to match the code. You had
to have done some additional editing. (Where in the code was the decision
to remove made? I can't seem to see it.)


<chaim>
-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
chaimf@pobox.com				               +1-718-236-0183

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org