#!/usr/bin/perl use strict; my %testhash = { 'key1' => 'val1' , 'key2' => 'val2' }; printf "Exists for key1 = %d\n", exists $testhash{'key1'};