Ask the usenet group comp.lang.perl.misc. This list is only for discussion of the design of the upcoming Perl 6.
----- Original Message ----- From: "Phil Daws" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 17, 2001 1:54 AM Subject: Berkeley Help Hi: I have a HASH file that contains : domain1.co.uk ACCEPT domain2.co.uk ACCEPT domain3.co.uk ACCEPT I am using the following code to check that a key exists. The problem is that it never finds it! What am I doing wrong??? ----------------------------------------------------------------- $file = "/file.db"; $db = tie(%stats, "DB_File", "$file", O_CREAT|O_RDWR, 0666, $DB_HASH) || die ("Cannot open $file"); $key = 'domain1.co.uk'; print "Exists\n" if exists $stats{$key}; untie %stats ;