[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl & Databases



At 04.55 -0500 1999.01.03, Matt Henderson wrote:
>          + funny empty field problem

I tried removing the tie() function completely, and it works.  I think this
is just because of the lack of multidimensional capabilities of the DBM
files.  I don't know why one thing works and others don't or whatever; but
the fact that you are doing multidimensional arrays with DBMs is enough of
a cuase for things to act screwy.

Aside from the MLDBM stuff I mentioned, you can also so something like this:

  $hash{'x','y','z'} = 'foo';

Perl uses a high-bit ASCII character as a delimiter here, so you can
emulate multidimensional arrays.


>          + database size using AnyDBM_File or DB_File

AnyDBM_File uses NDBM_File by default, and I guess DB_File files are just
bigger.  I've noticed their large size before.

My file sizes, though, are 16K for AnyDBM_File, and 128K for DB_File.

>          + (Also, I've mentioned in the comments a third problem.)

I don't get that problem.  I took out the rename() part and used
AnyDBM_File to access the database repeatedly, and everything was fine.

Hope this helps,

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch