in reply to How to reterive the values from hashes

If you are sure you will only ever have 2 keys, and only one of them will have the word CHECK within it try

foreach $key (%count){ if ($key =~ /CHECK/){ $c = $count{$key}; } else { $c1 = $count{$key}; } } print "c = c$ , c1 = $c1\n"
poj