while(<$fh>) { my %hash = map{ chomp; split/ /; $_[1] => $_[0];} <$fh>; } print$hash{20}; #prints CHASE