13.07.2015 Views

Perl 语言编程 - Linux教程

Perl 语言编程 - Linux教程

Perl 语言编程 - Linux教程

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

'Antony' => 'Cleo' . 'patra',};对 于 散 列 的 数 值 ( 但 不 是 键 字 ), 你 可 以 自 由 地 混 合 其 他 匿 名 数 组 , 散 列 , 和 子 过 程 , 组 合成 你 需 要 的 复 杂 数 据 结 构 。现 在 我 们 有 了 表 示 本 章 开 头 的 表 的 另 外 一 种 方 法 :$table = {"john" => [47, "brown", 186],"mary" => [23, "hazel", 128],"bill" => [35, "blue", 157],};这 是 一 个 数 组 散 列 。 选 择 最 好 的 数 据 结 构 是 难 度 很 高 的 工 种 , 下 一 章 专 门 讲 这 个 。 但 是 为 了恶 作 剧 , 我 们 甚 至 可 以 将 散 列 的 散 列 用 于 我 们 的 表 :$table = {"john" => { age => 47,eyes=> "brown",weight => 186,},"mary" => { age => 23,eyes=> "hazel",weight => 128,},"bill" => { age => 35,eyes=> "blue",weight => 157,},212

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!