#!/usr/bin/perl -w # This script is a minimalistic version of finding # database entries in the db. use DB_File; # load database module $dbmlocation = 'database/riverweb.dbm'; tie %hash, DB_File, $dbmlocation # open database, to be accessed or die "Can't open FILENAME: $!\n"; # through %HASH if (exists $hash{'1'}) { # check whether in database print "Exists, Biatch: $hash{'1'}\n\n"; } # without check $V = $hash{'1'}; print "Post: Exists, Biatch: $V\n";