I am trying to write a simple perl script which opens a file called file1.txt, reads the first 3 lines, and writes them to another file called output.txt
Can someone show me how to do this ? So far I have written the following:
#!/usr/bin/perl
# test.pl
use warnings;
use strict;
my $infile = "file1.txt";
my $outfile = "output.txt";
open FILE, $infile or die $!;
???
