#!/usr/bin/perl -w use strict; my %books = ( fred => 3, wilma => 1, barney => 0, pebbles => undef ); my $someone = 'wilma'; if ($books{$someone}) { # Let's fancy it up: show how many books they have! print "$someone has $books{$someone} books checked out\n"; }