匿名hash

[root@oadb test]# cat a1.pl 
use Data::Dumper;
my @a=qw/1 3 5 7 9/;
push @b ,{@a};
print Dumper(@b);
print "
";


print $b[0]->{1};
print "
";
[root@oadb test]# perl a1.pl 
$VAR1 = {
          '1' => '3',
          '9' => undef,
          '5' => '7'
        };


3

匿名hash  把hash引用塞入到数组,作为数组的第一个元素





                                    
原文地址:https://www.cnblogs.com/hzcya1995/p/13350020.html