inconsistent output ... Is it not permitted to change the value of a tied hash in an each iteration? ... It seems that some values in the tied hash are unaltered and some are altered more than once. ..

What versions do you have?

print " perl $] BerkeleyDB $BerkeleyDB::VERSION db_version $BerkeleyDB::db_version ";

This is what i see, double dashes means the iterator goes back sometimes and repeats keys already seen, its a bug you should report it

$ perl berkeleydb-hash-bug-1166570.pl 1901 perl 5.014001 BerkeleyDB 0.49 db_version 5.1 INITIAL LOAD LLLL 1901 records LLLL-WWWWWWWWWWWWWWWWW 895 LLLL-YYYYYYYYYYYYYYYYYYYYYYYYYYYY 73 LLLL-WWWWWWWWWWWWWWWWW-WWWWWWWWWWWWWWWWW 1 LLLL-ZZZZZZ 76 LLLL 856 $ perl berkeleydb-hash-bug-1166570.pl 1902 perl 5.014001 BerkeleyDB 0.49 db_version 5.1 INITIAL LOAD LLLL 1902 records LLLL-YYYYYYYYYYYYYYYYYYYYYYYYYYYY 93 LLLL-WWWWWWWWWWWWWWWWW-WWWWWWWWWWWWWWWWW 494 LLLL-WWWWWWWWWWWWWWWWW-WWWWWWWWWWWWWWWWW-WWWWWWWWWWWWWWWWW 1 LLLL-WWWWWWWWWWWWWWWWW 1099 LLLL-YYYYYYYYYYYYYYYYYYYYYYYYYYYY-YYYYYYYYYYYYYYYYYYYYYYYYYYYY 37 LLLL-ZZZZZZ-ZZZZZZ 46 LLLL-ZZZZZZ 95 LLLL 37 $ perl berkeleydb-hash-bug-1166570.pl 1901 perl 5.012002 BerkeleyDB 0.43 db_version 5.1 INITIAL LOAD LLLL 1901 records LLLL-WWWWWWWWWWWWWWWWW 895 LLLL-YYYYYYYYYYYYYYYYYYYYYYYYYYYY 73 LLLL-WWWWWWWWWWWWWWWWW-WWWWWWWWWWWWWWWWW 1 LLLL-ZZZZZZ 76 LLLL 856 $ perl berkeleydb-hash-bug-1166570.pl 1902 perl 5.012002 BerkeleyDB 0.43 db_version 5.1 INITIAL LOAD LLLL 1902 records LLLL-YYYYYYYYYYYYYYYYYYYYYYYYYYYY 93 LLLL-WWWWWWWWWWWWWWWWW-WWWWWWWWWWWWWWWWW 494 LLLL-WWWWWWWWWWWWWWWWW-WWWWWWWWWWWWWWWWW-WWWWWWWWWWWWWWWWW 1 LLLL-WWWWWWWWWWWWWWWWW 1099 LLLL-YYYYYYYYYYYYYYYYYYYYYYYYYYYY-YYYYYYYYYYYYYYYYYYYYYYYYYYYY 37 LLLL-ZZZZZZ-ZZZZZZ 46 LLLL-ZZZZZZ 95 LLLL 37

In reply to Re: altering value in tied hash by Anonymous Monk
in thread altering value in tied hash by rlmoe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.