in reply to Re: Skipping the first 4 lines of a file:: Is there a better way?
in thread Skipping the first 4 lines of a file:: Is there a better way?
@_ = split /(?:.+\n){$skip}/m, "@_";
Gah, that's terribly inefficient. splice( @_, 0, $skip ) at the least if you feel you have to modify @_. foreach( @_[ $skip .. $#_ ] ) { ... } would be even better since it doesn't have to move anything around.
Update: Changed from hardcoded 4 to $skip to match.
--
We're looking for people in ATL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |