On Wed, Mar 06, 2002 at 10:33:27AM -0800, Peter Jay Salzman wrote: > i've never used a real database in my life. first attempt: > > Can't locate object method "TIEHASH" via package "/home/p/.car/blah" at > ./newmain.pl line 97, <> line 7 (#1) > (F) You said to do (or require, or use) a file that couldn't be > found. Perl looks for the file in all the locations mentioned in @INC, > unless the file name included the full path to the file. > > use DB_File; > ... > tie %vehicle, $control, 'data', O_RDWR|O_CREAT|O_EXCL, 0644; > > help? if someone can send me a "hello world" type program that uses > BSD-DB, that would be really useful.
There is one in the manual page that provides a decent example. There are more in O'Reilly's "Programming the Perl DBI". EXample scripts from the book may be found on O'Reilly's FTP site. > btw, i looked for henry's notes from his lugod talk on perl db; they > don't seem to be on the website. :( It may be found at <http://hajhouse.org/linux/dbi.dvi>. But my talk discusses the Perl DBI (for Postgresql and other server-based SQL-interpreting databases), while you appear to be using the Berkeley DB, which, alas, I have not. If you are not set on Berkeley DB and can settle for slower performance, you might consider DBD::CSV (Debian: libdbd-csv-perl), which emulates an SQL database in a human-readable flat file. -- Henry House The attached file is a digital signature. See <http://romana.hajhouse.org/pgp> for information. My OpenPGP key: <http://romana.hajhouse.org/hajhouse.asc>.
msg01689/pgp00000.pgp
Description: PGP signature
