I have this program that runs OK on Windows with "perl program.pl" in the command prompt or "perl program.pl file1.txt file2.txt".
print "there were ",scalar(@ARGV), " arguments passed to this program\n";
if ( scalar(@ARGV) > 1 )
print "First Argument: $ARGV\n";
print "Second Argument: $ARGV\n";
my $filename = shift;
print "will process file $filename\n";
#open(INPUT_FILE,"<$filename") || die("could not open $filename");
Warning X Line 31: Using a | char in open without a | at the beginning
or end is usually a typo. Do you want to continue?
or instead of
open. As an aside, I have always been told that the three argument form of
open is what should be used. I do know that Perl doesn't always reference the line that has the problem. Of course I am taking for granted that the commented out line is the line in question and you commented it out as a test?