my %hash = ('First' => 1, 'Second' => undef ); print "First\n" if exists $hash{'First'}; print "Second\n" if exists $hash{'Second'}; print "Third\n" if exists $hash{'Third'}; __OUTPUT__ First Second