Perl中嵌套数据结构的简单参考或备忘单是什么?
答案 0 :(得分:8)
一个优秀的开始教程是 如果您安装了正常的Perl,您应该始终能够通过终端获取这些内容。但您也可以通过网络(以及可下载的pdf)通过这些链接获取它们。 对于备忘单/参考表,你可能会比PerlMonks上的this post更糟糕。perldoc perlreftut
。我还强烈推荐内置Perl文档中的另外两个教程:perldoc perllol
和perldoc perldsc
。 (我按照这个顺序完成了它们,但你的里程可能会有所不同。我也发现在之后我更容易阅读perldoc perlref
我完成了这些教程,但同样,你可能没有。)< / p>
答案 1 :(得分:4)
perldoc perldsc有助于理解这些嵌套结构
PERLDSC(1) User Contributed Perl Documentation PERLDSC(1) NAME perldsc - Perl Data Structures Cookbook DESCRIPTION The single feature most sorely lacking in the Perl programming language prior to its 5.0 release was complex data structures. Even without direct language support, some valiant programmers did manage to emulate them, but it was hard work and not for the faint of heart. You could occasionally get away with the $m{$AoA,$b} notation borrowed from awk in which the keys are actually more like a single concatenated string "$AoA$b", but traversal and sorting were difficult. More desperate programmers even hacked Perlâs internal symbol table directly, a strat- egy that proved hard to develop and maintain--to put it mildly.
答案 2 :(得分:2)
尝试perldoc perlcheat
REFERENCES
\ references $$foo[1] aka $foo->[1]
$@%&* dereference $$foo{bar} aka $foo->{bar}
[] anon. arrayref ${$$foo[1]}[2] aka $foo->[1]->[2]
{} anon. hashref ${$$foo[1]}[2] aka $foo->[1][2]
\() list of refs
答案 3 :(得分:0)
答案 4 :(得分:0)
perldsc食谱清单。
答案 5 :(得分:0)