in reply to Reading specific lines in a file

I'm not sure what you are after. Does the following meet your expectations (no array, one line)?
perl -e '10 .. 20 and print while <>' wordlist

Or

perl -e 'print for (<>)[9 .. 19]' wordlist
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Reading specific lines in a file
by gurpreetsingh13 (Scribe) on May 20, 2014 at 08:32 UTC
    Thanks.
    Works.
    My hit-n-trial also worked out finally.
    perl -e 'print ((`cat wordlist`)[60..70]);'

      If you want to eliminate `cat wordlist`, you can use File::Slurp or do { local @ARGV='wordlist'; <> }.

        That's right. But again, more than one line.
        use statement, then slurp statement, then print