Does changing
print OUTFILE head -1;
to
print OUTFILE $line if $. == 1;
do what you want?
If you're unfamiliar with $., it's documented in perlvar.
-- Ken
In reply to Re: Obtaining header from file (first line) - printing to output file
by kcott
in thread Obtaining header from file (first line) - printing to output file
by dkhalfe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |