in reply to Obtaining header from file (first line) - printing to output file
#head -1 <IN>; #my $firstline = IN;
Try changing this to the following and see if it does what you want:
my $header = <IN>; print OUTFILE $header;
Of course, be sure to open your OUTFILE file handle before writing.
|
|---|