我想查看ARGV,$ARGV,@ ARGV的定义,所以我使用perldoc来找到它.由于它不是子模块或模块,perldoc -f或perldoc模块无济于事.
我问了一个人,他告诉我看perldoc perlvar,我找到了ARGV部分.
我的问题是如何在Perl文档中找到一些通用术语?或者如何发现ARGV在perlvar?一些通用的搜索工具呢?
解决方法
经过短暂的perldoc搜索后发现–help:
.... -v Search predefined Perl variables
所以,基本上:
$perldoc -v @ARGV @ARGV The array @ARGV contains the command-line arguments intended for the script. $#ARGV is generally the number of arguments minus one,because $ARGV[0] is the first argument,not the program's command name itself. See $0 for the command name.
虽然在查找标量以避免shell插值时你必须要有创意:
perldoc -f '$ARGV'