sub get_x { # $coord{refaddr $_[0]}->{'X'} == 42 return $coord{refaddr $_[0]}->{'ex'}; # but this is undef }