DBD::DBM and Berkeley Problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


Can anyone tell me whats the problem with the following code. I get an
error about 2nd tie fails?
Thank You


use DBI;

my $dbh = DBI->connect('dbi:DBM:type=BerkeleyDB;mldbm=Storable;ext=');
my $dir = "./"; #/media/sda1/home/cikic/.qtstalker/data1/data/Stocks/
use BerkeleyDB;

my $env = new BerkeleyDB::Env -Home => $dir;  # and/or other Env flags

$dbh-> = {
     'DB_CREATE'  => DB_CREATE  # pass in constants
   , 'DB_RDONLY'  => DB_RDONLY  # pass in constants
   , '-Cachesize' => 1000       # set a ::Hash flag
   , '-Env'       => $env       # pass in an environment

print $dbh-> . "\n";

my $stmt = $dbh->prepare("SELECT * FROM nasdaq");

Output is:
MLDBM error: Second level tie failed, "" at /usr/local/lib/perl/5.8.8/
DBD/DBM.pm line 390
cikic@MrZylinder:~/sources/berkeley-sql$ cat bdb_connect.pl

Site Timeline