更新时间:2023-12-04 11:23:04
它具有非常特殊的用途:
It has very specific uses:
&
告诉Perl忽略潜艇的原型.&
可以允许您使用呼叫者的@_
. (&foo;
,没有任何括号或参数).goto &foo;
和defined &foo
.\&foo
).&
tells Perl to ignore the sub's prototype.&
can allow you to use the caller's @_
. (&foo;
with no parens or arguments).goto &foo;
and defined &foo
.\&foo
).由于内置函数不能以&
开头,因此某些人(大多数是初学者)使用它来区分用户子对象和内置函数.
Some people (mostly beginners) use it to distinguish user subs from builtin functions, since builtin functions cannot be preceded by &
.