use strict; use warnings; my %conv; open my $fh, '<', 'conv.txt' or die "can not open conv.txt\n"; while (<$fh>) { chomp; my ($k, $v) = split; $conv{$k} = $v; } close $fh;