Make perl think your header is one line:
my $header; { local $/ = 'END'; open FH, "< $filename" or die $!; $header = <FH>; close FH or die $!; }
Localizing $/ in brackets cuts out bad side effects, and just reading to the marker gives you minimal read length.
After Compline,
Zaxo
In reply to Re: Reading a Filehandle by line or by stream
by Zaxo
in thread Reading a Filehandle by line or by stream
by MadPogo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |