It might be time for you to show some code -- in particular, what you have on the same line with  use MLDBM and what the  tie statement looks like, along with anything else relevant to the latter.

Now that you have DB_File installed, you could also test what happens when you open/tie your 5-yr-old data file as a plain-vanilla DB_File hash, just to make sure it's still readable, and to get a look at what the keys and values are.

UPDATE: In case it helps, here's a quick/easy way to dump out the contents of a DB_File hash:

use strict; use DB_File; my $Usage = "Usage: $0 db_file_name\n"; die $Usage unless ( @ARGV == 1 and -f $ARGV[0] ); my %file_hash; tie ( %file_hash, 'DB_File', $ARGV[0] ) or die "DB_File: $ARGV[0]: $!"; while ( my ( $key, $val ) = each %file_hash ) { print "key: $key\n$val\n;\n"; } untie %file_hash;
Redirect STDOUT to some other file. It will have records delimited by "\n;\n", and each record will have at least two lines of data, the first line being the hash key (preceded by "key: ") and the second line (plus any additional lines preceding "\n;\n") being the value for that key.

(another update: this assumes that your key strings do not contain line-breaks while you values might; in any case, you could also transliterate things to suit your taste -- e.g.  s/(\p{IsCntrl})/sprintf("0x{%02x}",ord($1))/ge; or something like that.)


In reply to Re^3: MLDMB Problem by graff
in thread MLDBM Problem by cormanaz

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.