You have lots of ground to cover before giving up on dbmopen. You might try putting in an 'or die "failed: $!"' and have dbmopen give you the reason it failed. But which database are you using, where is the db etc. Should 'param' be %param?

try (sorry you'll have to link yourself):

DBI 'home page': http://www.arcana.co.uk/technologia/perl/DBI
       
        Master archive site for Perl DB information:
            ftp://ftp.demon.co.uk/pub/perl/db/
        Mailing list archive:                /DBI/perldb-interest/
       
        Searchable index of the dbi-users mailing list:
        http://www.coe.missouri.edu/~faq/lists/dbiusers/
       
        mysql home page: http://www.tcx.se
I didn't have much luck looking for dbmopen syntax on cpan, but everything there uses tie to tie a hash/array to a dbm file.

But perldoc -f dbmopen says:

among other things
    # print out history file offsets
    dbmopen(%HIST,'/usr/lib/news/history',0666);
    while (($key,$val) = each %HIST) {
        print $key, ' = ', unpack('L',$val), "\n";
    }
    dbmclose(%HIST);
so param should at least be %param and it should be the hash you want connected/tied (perldoc also says dbmopen is outdated, use tie) to the dbm. I'm guessing you have a few other things not working too.

HtH

a


In reply to Re: dbmopen does not work by a
in thread dbmopen does not work by sinan

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.