#!/usr/bin/perl 
#w3.10.pl read in from a file and write out to a file.

open (FH, "data.txt");
while (<FH>){
   @lines = (@lines, $_);
} 
close (FH);


open(OUT, ">data.no");
   foreach (@lines){
      $x++;
      print(OUT "line $x: $_") ;
   }
   close (OUT);

__END__


