我的程序运行在Windows上,命令提示符中有"perl program.pl“或"perl program.pl file1.txtfile2.txt”。
use strict;
use warnings;
print "there were ",scalar(@ARGV), " arguments passed to this program\n";
if ( scalar(@ARGV) > 1 )
{
print "First Argument: $ARGV[0]\n";
print "Second Argument: $ARGV[1]\n";
}
sub process_file($)
{
my $filename = shift;
print "will process file $filename\n";
#open(INPUT_FILE,"<$filename") || die("could not open $filename");
}即使在退出并返回到Padre之后,当我开始运行它时,也会得到这个对话框(如果我单击Yes按钮,它仍然可以运行):
警告X行31:在开始或结束时使用open中的\\_你想继续吗? 是
发布于 2012-09-04 13:30:18
我用or代替||和open。顺便说一句,我一直被告知,应该使用open的三种参数形式。我知道Perl并不总是引用有问题的行。当然,我想当然地认为注释行是有问题的行,而您将其作为测试注释掉了吗?
https://stackoverflow.com/questions/12263611
复制相似问题