$h{$B}= {'number'=>$A,'value'=>$C}; print $h{$B}{value}; if ($h{$B}{number}>0) { ...