|more useful options|
Skipping the first 4 lines of a file:: Is there a better way?by PerlBear (Hermit)
|on Jun 03, 2005 at 12:23 UTC||Need Help??|
PerlBear has asked for the
wisdom of the Perl Monks concerning the following question:
Greetings Fellow Monks!
In a nutshell what I would like to do is skip the first 4 lines of a data file that I am reading in. Essentially the first 4 lines are junk, header info that I don't need.
Basically I already do know how to do this; I have supplied my two approaches to the task below, both of which work just fine. I am just wondering if there is an even better way to do it, perhaps a one-liner.... (always looking for those efficient little one liners) :) :) :)
..or perhaps even less elegant...
I am basically curious what other perhaps better ways that this can be done.
As always, your thoughts, bits of wisdom, and insight are greatly appreciated!
Thanks in advance!