in reply to Line-by-line processing of a file where the first line is different
Why not just read one line first?
my $header_row = <>; # process it while (<>) { # process the file }
If you're not sure if the first line is the right one, loop until you find the header, then break out of the header-search loop and loop through the data using a different loop.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Line-by-line processing of a file where the first line is different
by jkeenan1 (Deacon) on Jul 11, 2006 at 11:28 UTC |