if ( ! defined $rates{$_} { print "Don't know how to handle unrecognized rate '$_'.\n"; # handle error in some way. } print $rate{$_}