|
|
标量 |
数组 |
散列 |
函数 | |
|
定义符号 |
$ |
@ |
% |
& | |
|
定义 |
$test |
@test |
%test |
Sub test | |
|
使用 |
$test = ‘a’ |
@test = (1,2,3) |
%test = (‘a’=>1,’b’=>2) |
Sub test{ code } | |
|
元素 / 使用 |
- |
$test[n] |
$test{key} |
&test(param) | |
|
元素符号 |
- |
[..] |
{..} |
(..) | |
|
引用 |
/$test |
/@test |
/%test |
/&test | |
|
* 引用 1 |
*test{SCALAR} |
*test{ARRAY} |
*test{HASH} |
*test{CODE} | |
|
解引用 |
符号解 |
${/$test} |
@{/@test} |
%{/%test} |
&{/&test} |
|
箭头解 |
- |
$test->[n] |
$test->{key} |
$test->(param) | |
|
$ 解 |
- |
${/@test}[n] |
${/%test}{key} |
- | |
|
匿名创建 |
- |
$test=[1,2,3,4] |
$test={‘a’=>1,’b’=>2} |
$test=sub{ code } | |
457

被折叠的 条评论
为什么被折叠?



