#!/usr/bin/perl -w ######################################################################## use strict; my $file=$0; my $line=1; open(FH,"$file") or die $!; print "Content-type: text/plain\n\n\n"; while () { printf "%d:%s",$line++,; } #### --$ ./filetest.pl Content-type: text/plain 1:######################################################################## --$ #### #!/usr/bin/perl -w ######################################################################## use strict; my $file=$0; my $line=1; open(FH,"$file") or die $!; print "Content-type: text/plain\n\n\n"; while () { printf "%d:%s",$line++,$_; # $_ vs. } #### --$ ./filetest.pl Content-type: text/plain 1:#!/usr/bin/perl -w 2:######################################################################## 3: 4:use strict; 5: 6:my $file=$0; 7:my $line=1; 8: 9:open(FH,"$file") or die $!; 10: 11:print "Content-type: text/plain\n\n\n"; 12:while () { 13: printf "%d:%s",$line++,$_; 14:} --$