use strict; use warnings; use MCE::Shared::Hash; my $prices = MCE::Shared::Hash->new(); $prices->{'pizza'} = 12.00; $prices->{'coke'} = 1.25; $prices->{'sandwich'} = 3.00; if ($prices->keys("key =~ /cok/")) { print "found the key 'cok' in the hash\n"; } if ($prices->keys("key =~ /cok/ :AND val >= 1.50")) { print "found the key 'cok' in the hash greater than or equal \$1.50\n"; } if ($prices->keys("key =~ /cok/ :AND val < 1.50")) { print "found the key 'cok' in the hash less than \$1.50\n"; } __END__ found the key 'cok' in the hash found the key 'cok' in the hash less than $1.50