## @hbas contains fcs0 fcs1 my %hoh; for my $hba (@hbas) { $hoh{$hba} = qx(/usr/bin/fcstat $hba|/usr/bin/grep -i node|/usr/bin/cut -f2 -d:); } ### above gives me WWN strings while (my ($key, $val) = each %hoh) { print "$key =>\n\t$val\n"; print $val; } __OUTPUT__ fcs1 => 0x20000000C95A58AE 0x20000000C95A58AE fcs0 => 0x20000000C95C0379 0x20000000C95C0379