while () { next until $. > 5; # do stuff with lines 6..EOF }