我试图使用列表/数组对哈希进行排序
my $hash = { cta => '01340031810312074443',
ttr => '001',fil => '0000',
ref => '0000',
mef => '0000000000000060000',
mch => '0000000000000000000',
nli => '00000000',
tdi => 'V',
ndi => '006126952',
tdip => 'V',
ndip => '006126952',
};
@order = qw(cta ttr fil ref mef mch nli tdi ndi tdip ndip);
我们知道 Perl 不会将订单保存在哈希中,但我需要按该顺序打印。我怎样才能做到这一点?
谢谢