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

[MacPerl] DB_File File Size



Hello Folks,

Now that I've gotten relatively comfortable using DB files with Perl CGI
scripts under UNIX, I thought I'd attempt using them with MacPerl. First
sample script (with die()'s removed for briefness):

    #! Perl

    use DB_File;

    my $name = "my_db.dbm";

    tie(%$name, 'DB_File', $name, O_RDWR|O_CREAT, 0644);

    for ($i = 1; $i < 10; $i++) {
         $$name{$i} = time;
    }

    untie(%$name);

This resulted in a file on my Mac, "my_db.dbm," that was *2.5 megabytes* in
size! (Allowing $i to run to 100 crashed MacPerl when the DB file was *128
megabytes.*) Surely that can't be normal behavior. Have I done something
obviously wrong here?

Thanks in advance.

    -- Matt

Matt Henderson   |   matt@exponet.net   |    www.exponet.net
                 .                      .
E x p o n e t   M e d i a  T e c h n o l o g i e s   G m b H
Full-Service Web Development & Engineering Services Provider

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org