#!/usr/bin/perl my $numArgs = $#ARGV + 1; my $filename = 'defaultFilename'; $filename = $ARGV[0] if $numArgs > 0; open (MYFILE, $filename); while (<MYFILE>) { chomp; print "$_\n"; } close (MYFILE);
#!/usr/bin/perl my $numArgs = $#ARGV + 1; my $filename = 'defaultFilename'; $filename = $ARGV[0] if $numArgs > 0; open (MYFILE, $filename); while (<MYFILE>) { chomp; print "$_\n"; } close (MYFILE);