Bryan,

Too bad about the MacPerl restriction. I don't need the DBI module to use DB
hashes. DB hash capability came with my Perl distribution, and it might come
with MacPerl, too -- I don't know. (I'm running Perl under RedHat Linux).
I've had no trouble creating DB hashes whose keys are lccn numbers and whose
values are MARC records up to 4K apiece.  

As you say, there is the portability issue. You would have to recreate the
DB hashes if you changed platforms (or even if you just change directories
on a given computer). DB hashes seem to be very fussy about your moving
their data structures.  

To see if you have DB hash capability, you might try a simple test DB file,
like so:

dbmopen(%DATA, "my_database", 0644) or die "Cannot create my_database: !";
$DATA{"fred"} = "bedrock";
print "$DATA{"fred"}\n";

See if a "my_database" file gets created on your hard drive. If so, you can
quit out of the program, come back, and your key->value pair should have
been persistently stored. 

If not, you might need to install a Berkeley DB library, assuming there is
one available for MacPerl. Good luck!

-- Chris


I've only looked at DBM a little bit, but from what I saw, the versions
available to me (in MacPerl, and possibly in Windows) would not allow
storing MARC (in a raw string), since the field lengths or keys would be too
big. The documentation also seemed to indicate a problem of portability,
since each platform has different base DBM files. Anything that requires
compiling non-Perl code poses a problem (for me, anyway, since the compiler
(MPW) crashes my machine, and is a little out of my current range of
understanding), so modules like DBI are not availble (for MacPerl 5.8.0a).
Of course, I could be wrong, and would be very happy if that were the case.

If only I could upgrade to MacOS X, but that is still a ways off.

Thank you for your assistance,

Bryan Baldus
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://home.inwave.com/eija



Reply via email to