Here's a Perl script that demonstrates how to do "something" for each line in a text file that falls between a given line number range, i.e., a starting line number and an ending line number.
In this Perl script all I do is print each line that falls between this "start" and "stop" range, but of course your own Perl program can do anything it needs to within this range. In short, this Perl script does the following: