l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
July 21: Defensive computing: Information security for individuals
Next Installfest:
TBD
Latest News:
Jul. 4: July, August and September: Security, Photography and Programming for Kids
Page last updated:
2002 Mar 06 16:46

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] perl db question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] perl db question



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>.

Attachment: pgp00003.pgp
Description: PGP signature



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.