in reply to Hash key counting
If you are expecting the %columns to increase then you may want to add a print statement that says:
print "Discount == 1\n";
Then check to see if this is happening as often as you expect.
Note: If you are not going to use the value of the hash, you could save time by setting it to undef as in
$columns{$key_num} = undef;
And if you are going to do that, you might as well use an array instead of a hash, but there is probably something else you are using it for.
I hope this explains what is going on.
Cheers L~R
Update: Modified entire reply as I realized the problem is probably with the outside loop
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Hash key counting
by blackjudas (Pilgrim) on Apr 21, 2003 at 21:51 UTC | |
by Limbic~Region (Chancellor) on Apr 21, 2003 at 21:57 UTC | |
by tye (Sage) on Apr 22, 2003 at 16:04 UTC |