「read.pl」使い方は「%read.pl filename」
#!/usr/local/bin/perl
#
#%read.pl filename
use strict;
my $filename = './read.pl';
$filename=$ARGV[0];
open FILEHANDLE, "<$filename" or die "cannot open : $!";
my $i=0;
while (my $str = ){
$i++;
print $i,"\t",$str;
}
print "\n";
close FILEFANDLE;
[0回]
PR