鑑於以下XML::Simple對象,我將如何將其中一個鍵值複製到標量分配中。以下輸出來自print Dumper($xmlobjectreturnedfrommodule);
。Perl:在標量上下文中訪問XML :: Simple值
$VAR1 = {
'Address2' => {},
'City' => {},
'EmailAddress' => {},
'FName' => {},
'PostalCode' => {},
'LoginID' => {},
'StateProvinceChoice' => {},
'StateProvince' => {},
'Phone' => {},
'Country' => {},
'Site' => {},
'Address1' => {},
'PhoneExt' => {},
'LName' => {},
'OrganizationName' => {},
'Fax' => {}
};
通常用我只是使用類似下面這樣的hashref
:
print $xmlobjectreturnedfrommodule->{'LoginID'};
,但它返回下面的HASH(0x1e32640),而不是在hashref
密鑰值。有什麼關於XML::Simple
這是造成這個還是我錯過了什麼?