in reply to trying HoH
$VAR1 = { 'SAN_VC0_42' => { 'hdisk368' => 'state=enabled', 'hdisk303' => 'state=enabled', 'hdisk636' => 'state=enabled', 'hdisk35' => 'state=enabled', 'hdisk904' => 'state=enabled', 'hdisk571' => 'state=enabled', 'hdisk100' => 'state=enabled', 'hdisk839' => 'state=enabled' } };
If so, then this more verbose code will accomplish that:
my @vxdisk_lines = qx(vxdisk list $lun); chomp @vxdisk_lines; my @hdisks = grep {/hdisk\d+/} @vxdisk_lines; my %h; for (@hdisks) { my ($k, $v) = split; $h{$k} = $v; } $luns_to_hdisk{$lun} = \%h;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: trying HoH
by mikejones (Scribe) on Nov 11, 2008 at 02:27 UTC |