our (%h, $k, $v); unlink $db_file; tie %h, "DB_File", $db_file, O_RDWR|O_CREAT, 0666, $DB_HASH or die "Cannot open file '$db_file': $!\n"; $h{'nr'} = 0; $h{'name'} = "name"; $h{'titel'} = "titel"; $h{'keywords'} = "keywords"; $h{'desc'} = "desc"; $h{'page-topic'} = "page-topic"; $h{'inhalt'} = "text"; # print the contents of the file while (($k, $v) = each %h) { print "$k -> $v\n" } untie %h;