in reply to Uninitialized value!

What the hotshot said ... plus you could add a test for a thingy being defined/existed in place of or in addition to the test for a "bare" truth value. (Mind you existence test will work iff $someone is defined.) Below are some, if not all, of the ways to test various types of truth...

if ( $someone && $books{$someone} ) {...} if ( defined $someone && $books{$someone} ) {...} if ( defined $someone && defined $books{$someone} ) {...} if ( defined $someone && exists $books{$someone} ) {...} if ( exists $books{$someone} ) {...}