Ich bin ein Anfänger in Perl und ich versuche, einen Wert aus einem gesegneten Hash zu bekommen.Suche nach einem Wert in gesegnetem Hash
Der Wert ist IP-Adressen, Ich habe versucht ohne Erfolg
print $vm->guest->ipStack->dnsConfig->ipAddress;
print $vm->guest->ipStack{dnsConfig}{ipAddress};
$VAR1 = [
bless({
"ipRouteConfig" => bless({
"ipRoute" => [
bless({
"gateway" => bless({
"device" => 0,
"ipAddress" => "10.*******"
}, 'NetIpRouteConfigInfoGateway'),
"network" => "0.0.0.0",
"prefixLength" => 0
}, 'NetIpRouteConfigInfoIpRoute'),
bless({
"network" => "1***********",
"gateway" => bless({
"device" => 0
}, 'NetIpRouteConfigInfoGateway'),
"prefixLength" => 23
}, 'NetIpRouteConfigInfoIpRoute'),
bless({
"prefixLength" => 32,
"network" => "10**************",
"gateway" => bless({
"device" => 0
}, 'NetIpRouteConfigInfoGateway')
}, 'NetIpRouteConfigInfoIpRoute'),
bless({
"prefixLength" => 32,
"gateway" => bless({
"device" => 0
}, 'NetIpRouteConfigInfoGateway'),
"network" => "1***********5"
}, 'NetIpRouteConfigInfoIpRoute'),
bless({
"prefixLength" => 4,
"gateway" => bless({
"device" => 0
}, 'NetIpRouteConfigInfoGateway'),
"network" => "224.0.0.0"
}, 'NetIpRouteConfigInfoIpRoute'),
bless({
"gateway" => bless({
"device" => 0
}, 'NetIpRouteConfigInfoGateway'),
"network" => "255.255.255.255",
"prefixLength" => 32
}, 'NetIpRouteConfigInfoIpRoute'),
bless({
"prefixLength" => 64,
"network" => "fe80::",
"gateway" => bless({
"device" => 0
}, 'NetIpRouteConfigInfoGateway')
}, 'NetIpRouteConfigInfoIpRoute'),
bless({
"prefixLength" => 128,
"network" => "fe80::",
"gateway" => bless({
"device" => 0
}, 'NetIpRouteConfigInfoGateway')
}, 'NetIpRouteConfigInfoIpRoute'),
bless({
"prefixLength" => 8,
"network" => "ff00::",
"gateway" => bless({
"device" => 0
}, 'NetIpRouteConfigInfoGateway')
}, 'NetIpRouteConfigInfoIpRoute')
]
}, 'NetIpRouteConfigInfo'),
"dnsConfig" => bless({
"dhcp" => 0,
"searchDomain" => [
"france"
],
"hostName" => "HOST",
"ipAddress" => [
"10.60****",
"10.6*****",
"10.8*****"
],
"domainName" => "france"
}, 'NetDnsConfigInfo')
}, 'GuestStackInfo')
]
Welche Version der vmware SDK ist das? Hast du die Dokumentation? Können Sie Ihre Frage bitte bearbeiten und den Code hinzufügen, der Data :: Dumper Ausgabe erzeugt. – simbabque