Perl进阶笔记

阅读更多
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
    }
);

 

你可能感兴趣的:(Perl进阶笔记)