问题描述
我似乎没有在。
I can't seem to find explicit documentation for $#
in perldoc
.
是的,我知道是什么,我可以看到隐含的参考在和,但我似乎不能找到任何独立的东西。
Yes, I know what it is, and I can see implicit references in places like perllol
and perldsc
, but I can't seem to find anything standalone.
真正令人惊讶的是它在。
What's really surprising is that it doesn't have it's own section in perlvar
.
是否存在此类文档?如果是,那么在哪里?
Does such documentation exist? If so, where?
推荐答案
$#
不是一个特殊的变量,这是一个像 $
, @
,%
,&
和 *
。由于它只是数组的工作原理,所以您可以在,其余的文档就是变量如何工作。
$#
is not a special variable, it is a sigil like $
, @
, %
, &
, and *
. Since it is just part of how arrays work, you will find it documented in perldoc perldata
with the rest of the documentation on how variables work.
$#foo
只是一个方式来询问 @foo
它的最后一个索引是什么。没有单独的符号表条目(如 $ foo
,%foo
,& foo
和文件句柄 foo
)。
$#foo
is just a way of asking @foo
what its last index is. There is no separate symbol table entry for it (like there is for $foo
, %foo
, &foo
, and the filehandle foo
).
这篇关于$#的文档在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!