http://www.perlmonks.org?node_id=653952


in reply to Re^2: Mulitple values for a key in a hash
in thread Mulitple values for a key in a hash

In case that you need hash key existance (and not only) check use exists.
my %filesystems = ( hosta => { desc => 'x', filesystemA => qq|/the/first/filesystem|, +filesystemB => qq|/the/second/fielsystem| }, hostb => { desc => 'r', filesystemA => qq|/the/first/filesystem|, f +ilesystemB => qq|no filesystemB for 2nd host|} ); print "filesystemA exists\n" if exists $filesystems{'hosta'}->{'filesystemA'}; print "no_such_fs does not exist\n" if not exists $filesystems{'hosta'}->{'no_such_fs'};