in reply to Re^2: Two keys with the same name in a hash.
in thread Two keys with the same name in a hash.
I use dbmopen to create/open this dbm database file.You're probably using DB_File. Run
The version of perl is 5.8.6 Activeperl.
to verify.perl -MAnyDBM_File -le"print for @AnyDBM_File::ISA"
DB_File (or specifically DB_HASH, which is what you're using) doesn't allow multi-valued keys, so chances are you've misdiagnosed the situation. Insert the following snippet and examine your database
you'll be suprised what you find.use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Useqq=1; die Dumper( \%DATABASE );
Unless you have a good reason to use dbmopen, you should switch to the tie interface.
|
|---|