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

Bug#2254: perl doesn't initialize variable to 0 or something



have you tried perl -w on the code? It indicates "use of uninitialized
value" on lines 27 and 36... note that on 27, the first time through,
$itemind is undef, not 0, and $price_array{undef, 1} is not the same
as $price_array{0, 1}. Perhaps you're being misled by the fact that ++
on an uninitialized value gives 1? or that {} is taking string values,
not numeric values?

I don't know if this is a documented perl4/perl5 difference, but given
the output of perl -w, it doesn't seem surprising, at least to me...



Reply to: