Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: nested foreach loop not working

by hippo (Bishop)
on Dec 26, 2021 at 17:43 UTC ( [id://11139916]=note: print w/replies, xml ) Need Help??


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.


🦛

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139916]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-29 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found