in reply to Seek and delete
The simplest way is to copy the desired lines to a temporary store (an array or a temporary file) then write the contents of the store over the existing file (or rename the temporary file).
One specific implementation:
perl -i -ne"next if $.<100; print" file
|
|---|