This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Quote string argument in example -- necessary if using strict subs
[perl5.git] / lib / AnyDBM_File.pm
index 50acce4..c985e7e 100644 (file)
@@ -39,8 +39,8 @@ will only find GDBM_File.
 Having multiple DBM implementations makes it trivial to copy database formats:
 
     use POSIX; use NDBM_File; use DB_File;
-    tie %newhash,  DB_File, $new_filename, O_CREAT|O_RDWR;
-    tie %oldhash,  NDBM_File, $old_filename, 1, 0;
+    tie %newhash,  'DB_File', $new_filename, O_CREAT|O_RDWR;
+    tie %oldhash,  'NDBM_File', $old_filename, 1, 0;
     %newhash = %oldhash;
 
 =head2 DBM Comparisons