in reply to Trying to access array within hash
You can further simplify ig's solution with values instead of keys in the foreach and with interpolation in the print.
foreach my $policy (values %policies) { my $polMembers = $policy->[ (lc($targetRole) eq "source") ? 2 +: 4 ]; local $" = "\n"; print "@$polMembers\n"; }
Bill
In Section
Seekers of Perl Wisdom