in reply to Reading specific lines in a file

if you are talking about linenumber $. is for you:
perl -ne 'print if ($. >= 10 and $. <=20 )' filename.ext

HtH
L*
UPDATE: perl -ne 'print if 15 .. 17' *.pod
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Reading specific lines in a file
by gurpreetsingh13 (Scribe) on May 20, 2014 at 08:47 UTC
    That's right. Tried it already using $.
    Just wanted to do something via a list context as a one-liner.
    Learning purpose you can say. Anyway, thanks a lot.