jrhmpt01:/root/wx# cat x3.pl
$x={MemberList=>[{"UserName"=>'a'},{"UserName"=>'b'}]};
use Data::Dumper;
my $xx= Dumper($x);
print $xx;
print "
";
$y=$x->{MemberList};
my $xx= Dumper($y);
print $xx;
print "
";
print "222222222222222
";
print @$y;
print "
";
##@$y 是包含散列的数据
foreach $m (@$y){print $m->{UserName}."
";};
jrhmpt01:/root/wx# perl x3.pl
$VAR1 = {
'MemberList' => [
{
'UserName' => 'a'
},
{
'UserName' => 'b'
}
]
};
$VAR1 = [
{
'UserName' => 'a'
},
{
'UserName' => 'b'
}
];
222222222222222
HASH(0x1b0bd48)HASH(0x1b281a0)
a
b