# Get the names of files from the command line. 
# Read a file, print its line to the screen and to a file.
# 1st argument: name of input file
# 2nd argument: name of output file

$TheFile = $ARGV[0];
$OutputFile = ">" . $ARGV[1];

 

open (INFILE, $TheFile) or die "The file $TheFile could not be found";
open (OUTFILE, $OutputFile);


while (<INFILE>)        
{

            print  $_;                    
            print OUTFILE $_;                         
}

close INFILE;
close OUTFILE;
