in reply to DB_File recno treats array like a hash

On *BSDs it reports doubled DB size, for scripts attached it should be 2, but readdb.pl reports 4.

push adds to an array, so its quite possible to get to four by pushing two values -- there is no problem

  • Comment on Re: DB_File recno treats array like a hash

Replies are listed 'Best First'.
Re^2: DB_File recno treats array like a hash
by vleschuk (Initiate) on Oct 12, 2012 at 07:13 UTC
    length() method right after push reports correct length. Issue occurs only when tie'ing existing database after untieing.

      length() method right after push reports correct length. Issue occurs only when tie'ing existing database after untieing.

      There is no issue. You loop twice, you push two items to the same database twice, and you end up with four items after the second time.

      2 + 2 = 4

        Why it works on Linux, but doesn't on *BSD then?