DB_File works, but you do have to use flock and re-open the db each time to flush caches. MLDBM::Sync
does this for you. I'm surprised MySQL didn't work for you. Did you run it on localhost and use localhost as the domain name when connecting? That tells it to use unix domain sockets which is much faster than using TCP sockets.
BerkeleyDB can definitely do what you want, but I would suggest you skip the multi-locking and just let it use a global lock. The performance you get from using it that way is good enough for nearly any perl use and it avoids deadlocking. There's some sample code using it this way in a benchmark script here.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link
or How to display code and escape characters
are good places to start.