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

Re: [MacPerl] Tie::SubstrHash -- anybody??



At 1:22 PM 10/5/00, Linc Madison wrote:
>I've gotten no response whatever to my questions about Tie::SubstrHash. The
[snip]

>>#! /usr/local/bin/perl5
>>
>>require Tie::SubstrHash;
>>
>>print "Here we go!\n";
>>$hashsize = 114_862;		# arbitrary values from my data set
.................^

>>tie %test, "Tie::SubstrHash", 13, 86, $hashsize;
>>
>>for ($i = 1; $i <= $hashsize; $i++) {
>>	$key1 = $i + 100_000;		# fix to uniform 6-digit numbers
........................^
>

>This code prints a grand total of ONE KEY/VALUE PAIR for the entire hash. If
>you use the normal default hash structure, it works correctly.

I've watched this discussion, but not being familiar with 
Tie::SubstrHash, haven't spoken up until now. What kind of numbers 
are 114_862 and 100_000? If they're not really numerical, then 
testing and incrementing won't give the results your code seems to 
want. I imagine that this could cause your hash to have only one 
key/value pair...

Why not 114862, 100000?

??

- Bruce

__Bruce_Van_Allen___bva@cruzio.com__Santa_Cruz_CA__

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org