my @book = ( "Seek Away", "For True" ); my %info = ( "name" => "jason", "age" => 22 ); my %guy = ( "book" => \@book, "info" => \%info ); #更简洁的写法 my %guy = ( "book" => [ "Seek Away", "For True" ], "info" => { "name" => "jason", "age" => 22 } );
my @book = ( "Seek Away", "For True" ); my %info = ( "name" => "jason", "age" => 22 ); my %guy = ( "book" => \@book, "info" => \%info ); #更简洁的写法 my %guy = ( "book" => [ "Seek Away", "For True" ], "info" => { "name" => "jason", "age" => 22 } );