in reply to Re^3: nested foreach loop not working
in thread nested foreach loop not working

Here is the SSCCE for that:

#!/usr/bin/env perl use strict; use warnings; my $VAR1 = [ { 'namespace' => 'urn:oasis:names:tc:SAML:2.0:attrname-forma +t:unspecified', 'name' => 'First Name', 'values' => [ 'user.firstName' ], 'type' => 'EXPRESSION' }, { 'namespace' => 'urn:oasis:names:tc:SAML:2.0:attrname-forma +t:unspecified', 'name' => 'Last Name', 'values' => [ 'user.lastName' ], 'type' => 'EXPRESSION' } ]; for my $x (@$VAR1) { print "Name = $x->{name}, Values = $x->{values}[0]\n"; }

See perldsc for more on using data structures like this.


🦛