3
这是由s2p生成的程序的一部分,s2p是构建执行特定sed
命令的perl脚本的程序。
# getsARGV: Read another input line into argument (default: $_).
# Move on to next input file, and reset EOF flag $isEOF.
sub getsARGV(;\$){
my $argref = @_ ? shift() : \$_;
while($isEOF || ! defined($$argref = <ARG>)){
close(ARG);
return 0 unless @ARGV;
my $file = shift(@ARGV);
open(ARG, "<$file")
|| die("$0: can't open $file for reading ($!)\n");
$isEOF = 0;
}
1;
}
我在perlsub上找不到任何解释这个子签名的东西。
该代码的工作也很好。
有趣的问题。特别是因为我不知道答案可能是什么。 – JohnB 2013-04-20 04:33:50
http://perldoc.perl.org/perlsub.html#Prototypes – 2013-04-20 04:34:37