use XSLoader ();
our @ISA = qw(Tie::Hash);
-our $VERSION = "1.04";
+our $VERSION = "1.07";
XSLoader::load 'NDBM_File', $VERSION;
use Fcntl; # For O_RDWR, O_CREAT, etc.
use NDBM_File;
+ tie(%h, 'NDBM_File', 'filename', O_RDWR|O_CREAT, 0666)
+ or die "Couldn't tie NDBM file 'filename': $!; aborting";
+
# Now read and change the hash
$h{newkey} = newvalue;
- print $h{oldkey};
+ print $h{oldkey};
...
untie %h;
The hash variable you want to tie.
-=item 2.
+=item 2.
The string C<"NDBM_File">. (Ths tells Perl to use the C<NDBM_File>
package to perform the functions of the hash.)
-=item 3.
+=item 3.
-The name of the file you want to tie to the hash.
+The name of the file you want to tie to the hash.
=item 4.
=head2 C<ndbm store returned -1, errno 22, key "..." at ...>
-This warning is emmitted when you try to store a key or a value that
+This warning is emitted when you try to store a key or a value that
is too long. It means that the change was not recorded in the
database. See BUGS AND WARNINGS below.