Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!vtc.tacom.army.mil!ulowell.uml.edu!europa.chnt.gtegsc.com!news.mathworks.com!tank.news.pipex.net!pipex!swrinde!ringer.cs.utsa.edu!news.cais.net!news.cinenet.net!island.interverse.com!user From: richard@interverse.com (Richard Gilligan) Newsgroups: comp.unix.bsd.bsdi.misc Subject: Re: dbm or equivalent in BSDi ? Date: Wed, 23 Aug 1995 13:02:50 -0800 Organization: Cinenet Communications,Internet Access,Los Angeles;310-301-4500 Lines: 52 Message-ID: <richard-2308951302500001@island.interverse.com> References: <richard-2108951808480001@island.interverse.com> <VIXIE.95Aug21183457@wisdom.home.vix.com> NNTP-Posting-Host: island.interverse.com In article <VIXIE.95Aug21183457@wisdom.home.vix.com>, vixie@wisdom.home.vix.com (Paul A Vixie) wrote: > >Perl has hooks that make it easy to use > >DBM (which has come in very handy when I was working around UNIX(r) System > >V Release 4 and IRIX Release 5.2). > > > >Does anyone know if there is an equivelent program for BSDi? > > Well. Um, yes. Short answer: "man dbopen" will get you started; there is > an ndbm stub library built into the C Library of BSD/OS 2.0. You can probably > just tell Perl to use dbopen directly, otherwise tell it to use ndbm and all > will be well. > <snip>interesting history note removed</snip> I will come clean here- my unix ignorance seems to grow each day. I feel comfortable and capable writing perl scripts to let my web sites respond to user inputs, But inspite of learning stuff everyday, the great unix sea seems to get deeper and rougher, will it swollow me in my little perl boat?; the beauty of DBM (in my eyes) was that it was so simple to use within a perl script because interfacing the database is exactly like working with an associative array: ### dmbopen("%wine4food") | die "couldn't open wine and food database"; $wine4food{entrecote} = "bordeaux"; ### this bit of script creates creates a database call wine4food and associates the key "entrecote" with the value "bordeaux". The interface to dbopen is more complex (from my reading of the man page) and not as well documented as the use of associative arrays in perl. So the world is not perfect. Can I really tell perl to use ndbm so that all might be well? ndbm does not seem to come with bsdi either? > Margo Seltzer and Keith Bostic came up with "dbopen" which has a mode where it > can emulate dbm or ndbm. Is this the hash mode mentioned in the man pages? Thanks for your response! Richard Gilligan -- Richard Gilligan Web Site Software Design and Implementation email richard@interverse.com InterVerse Communications phone 310-392-2451 171 Pier Ave. #141 fax 310-581-1925 Santa Monica CA 90405 server http://interverse.com