in reply to A major problem/bug with DBM drivers on Windows machines

Data from another platform: Win95 / ActiveState v5.6.0 (build 623): 1212/10001  # huh? Ok, this made me want to try Chromatic's code: 10001/10000  # as expected since he did (0..$count)

Now the interesting thing is I had to install DB_File on This Old Box™ before running Chromatic's version, so just for fun what does Stamp_Guy's code do now? 10001/10001 # aha!

Now it certainly looks like there was something broken in my first test of Stamp_Guy's code that was fixed in the install. I removed DB_File and sure enough Stamp_Guy's code is borken again. Evidently (and I'm sure there are many here who can explain this) plain old dbmopen defaults to a defective DB that is included with the core ActiveState install. When you install a better one such as that in DB_File, it supersedes the broken one.

Update: Just to be clear, the first and third results were produced with Stamp_Guy's code unmodified from the root note of this thread. It turns out that Stamp_Guy is using Win98 and I used Win95 for my tests above, but when I repeated the tests on my NT4 box with the same ActiveState Perl build, the correct output appears even without DB_File, so now I suspect an OS problem, and not a problem with the default key+value size limitation in SDBM of 1024 bytes (see perldoc anydbm_file).

--
I'd like to be able to assign to an luser

Replies are listed 'Best First'.
Re: Re: A major problem/bug with DBM drivers on Windows machines
by petdance (Parson) on Jul 04, 2001 at 20:34 UTC
    Data from another platform: Win95 / ActiveState v5.6.0 (build 623): 1212/10001 # huh?
    That "1212/10001" looks correct if you were printing out the hash in scalar context. It basically means "there are 1212 hash buckets that are being used to store 10001 values". Or something similar.

    xoxo,
    Andy
    --
    <megaphone> Throw down the gun and tiara and come out of the float! </megaphone>