in reply to testing a non-existant hash entry...how to handle

The best way to check for the existance of a key in a hash is to use the exists function. Checking against the hash value doesn't always work, because you could have that value be 0. In fact, you could have that value be undef, so defined does not always give the right behavior either. Example:
use strict; my %hash; my $result; $hash{'foo'} = 0; $hash{'bar'} = undef; if ($hash{'foo'} && $hash{'bar'}) { $result = 'present'; } else { $result = 'NOT present'; } print "Direct checking thinks 'foo' and 'bar' are $result in \$hash.\n +"; if (defined($hash{'foo'}) && defined($hash{'bar'})) { $result = 'present'; } else { $result = 'NOT present'; } print "'defined' checking thinks 'foo' and 'bar' are $result in \$hash +.\n"; if (exists($hash{'foo'}) && exists($hash{'bar'})) { $result = 'present'; } else { $result = 'NOT present'; } print "'exists' checking thinks 'foo' and 'bar' are $result in \$hash. +\n";
-Ton
-----
Be bloody, bold, and resolute; laugh to scorn
The power of man...