0
我是新用Perl和我想哈希表的键生成使用XML::SIMPLE
模块 这样打印散列键
$data = $xml->XMLin("tp.xml");
这里是结构产生
$VAR1 = {
'technical-profile' => {
'WEB' => {
'mandatory-param' => {
'value' => 'high',
'name' => 'screenCapability',
'case-sensitive' => 'no'
}
},
'WAP/PDA' => {
'description' => 'wap/sparphone',
'mandatory-param' => {
'value' => 'low|intermediate',
'name' => 'screenCapability',
'case-sensitive' => 'no'
}
},
'WAP' => {
'description' => 'wap/sparphone',
'mandatory-param' => {
'value' => 'low',
'name' => 'screenCapability',
'case-sensitive' => 'no'
}
}
}
};
我试过
print "Key: $_" foreach (keys%data);
但我什么也没得到;我想打印WEB
WAP/PDA
和WAP
请问这是怎么回事?