I have linked a DB file with a hash and have tried to apply the exists function to it. For some reason I am getting the error: "AnyDBM_File doesn't define an EXISTS method at /var/www/cgi-bin/ds/deactivate.pl line 18". I even checked the Perl Cookbook and it reports that this is a valid function. What am I doing wrong?
~~Guildencrantz#!/usr/bin/perl -wT # # Script: Dynamic Dungeon Siege IP Database Deactivate IP Script # Author: Guildencrantz # Version: 4-13-02 # use strict; use CGI::Carp 'fatalsToBrowser'; my $userIP = $ENV{REMOTE_ADDR}; my $activeIPsPath = "/var/www/cgi-bin/ds/database/activeIPs"; dbmopen(my %activeIPs, $activeIPsPath, 0666) or die "Cannot open activeIPs database: $!"; if(exists $activeIPs{$userIP}) { delete($activeIPs{$userIP}); ...
In reply to Exists with DBM by Guildencrantz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |