else splice(@files,0,8) (Updated on the wise advice of moritz below)
Code that up, and see if it works, if not we can have a look, however without code or sample data we can only really have a punt @ this, the line to match may have unique characteristics, the other records may be different lengths, etc..