use YAML::XS qw( Load ); my %conversions = %{Load(<<'EOT')}; --- ALA: A TYR: Y MET: M ... EOT