You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
364 B
Perl

#!/usr/local/bin/perl -w
use Getopt::Long;
my $ret = GetOptions ("f|filename:s");
my $filename = $opt_f || die "Usage: $0 -f filename\n";
# Open the file.
open (INPUT, "$filename") || die "Could not open file $filename : $!\n";
while (<INPUT>)
{
chop;
print "Line $. = <$_>\n";
}
close (INPUT);