[HRPM] Is dbmopen different in Perl 5.6.0?

Mike Patten mpatten at exis.net
Mon Apr 17 17:15:03 CDT 2000


I thought I'd try the 'ggh' program from (chapter 14 of) the
_Perl_Cookbook_ because it looked interesting but I ran into a problem.

These lines:
44. $dotdir  = $ENV{HOME}    || $ENV{LOGNAME};
45. $HISTORY = $opt_database || "$dotdir/.netscape/history.db";
46.
47. die "no netscape history dbase in $HISTORY: $!" unless -e $HISTORY;
48. die "can't dbmopen $HISTORY: $!" unless dbmopen %hist_db, $HISTORY,\
0666;

generate this error:
 can't dbmopen /home/mpatten/.netscape/history.db: File exists at
 /home/mpatten/bin/ggh line 48.

It should be able to open an existing file, shouldn't it?  (Do I need to
learn to use the 'tie' function to do this stuff?)  I recently upgraded
from 5.005 to 5.6.0, is dbmopen different?  I don't know; I haven't used
the function before but I followed the book exactly.

-- 
Mike Patten <mpatten at exis.net>






More information about the Norfolk-pm mailing list