Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
sharing a (tied) hash between processes
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Thomas Reat, post: 4751578"] I have a perl script that maintains its state in a hash of hashes. It runs all the time. I have another script that must access (read only) this state. I'd also like to recover it in the event of a restart. What I'm doing now is to dump it to a file (200kB) every time through the main loop (every minute or so), despite the fact that the common case is for there to be no changes. And any changes that are made are tiny, to only a couple records. Locking is handled by writing to a temporary file and renaming over the original. What is an elegant solution for this? I've considered using a real database, but it seems like overkill. MLDBM looks like it might help me, but will I be able to have a dbm file opened for writing by one process and reading by another? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
sharing a (tied) hash between processes
Top