in reply to trying HoH

OK, so let's unpack what you did:

for my $lun ( ('SAN_VC0_42','SAN_VC0_43') ) { $luns_to_hdisk {$lun} = { grep /hdisk\d+/, qx(vxdisk list $lun) } +; } ;
so much, so straightforward.

I guess that's not what you intended ?

What did you have in mind ?

If you want $luns_to_hdisk{$lun} to be a list of the /hdisk\d+/ lines, you are very nearly there... you just need the anonymous list constructor [], not the anonymous hash constructor {}. That would be an HoL, though -- which is not what you were apparently wanting ?

You may want to consider a chomp somewhere or other to remove the line-endings from the selected lines. It's not clear whether you want the 'state=enabled' part, and if not you need a little extra code there.