in reply to Re^2: how can I print my hash values once?
in thread how can I print my hash values once?

Untested: You could add something like
if ($geneid =~ /[0-9]+|X|Y/ && $geneids{$geneid} =~/[0-9]+/) { print "..."; }