in reply to Re: pack_size for DBM::Deep
in thread pack_size for DBM::Deep

Thanks for the quick response. Sorry not to give more information. I am running on Windows 7 using perl64. I get the following error:
DBM::Deep: Odd number of parameters to 124 at tie_temp2.pl line 10

My test program is as follows:

#!/usr/bin/perl use strict; use warnings; use DBM::Deep; use Fcntl; # For O_RDWR, O_CREAT, etc. my $f1 = shift or die "usage: $0 file1 file ...\n"; open my $f, "< $f1" or die "$f1: $!\n"; tie my %f1, "DBM::Deep", "mydb.sdbm", pack_size => 'large'; while (<$f>) { $f1{$_}++; } while (<>) { # The rest of the files if (exists $f1{$_}) { print "GOOD\n"; } else { print "BAD\n"; } } untie %f1;

Replies are listed 'Best First'.
Re^3: pack_size for DBM::Deep
by ikegami (Patriarch) on Jul 14, 2010 at 14:54 UTC
    The documented usage is
    tie my %f1, "DBM::Deep", { file => "mydb.sdbm", pack_size => 'large', };
Re^3: pack_size for DBM::Deep
by marto (Cardinal) on Jul 14, 2010 at 14:48 UTC

    Welcome to the Monastery, please don't ignore the formatting advice given each time you post:

    Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!

    See also How do I post a question effectively?.