# read_and_write.pl # read from an input file # and write the content to an output file. # Assume the two filenames are provided in the command line. my $in_file = shift; my $out_file = shift; open IN, "<$in_file"; open OUT, ">$out_file"; while ( my $line = <IN> ) { print OUT "$line"; } close OUT; close IN;