Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Reading specific lines in a file

by gurpreetsingh13 (Scribe)
on May 20, 2014 at 08:32 UTC ( [id://1086748]=note: print w/replies, xml ) Need Help??


in reply to Re: Reading specific lines in a file
in thread Reading specific lines in a file

Thanks.
Works.
My hit-n-trial also worked out finally.
perl -e 'print ((`cat wordlist`)[60..70]);'

Replies are listed 'Best First'.
Re^3: Reading specific lines in a file
by Corion (Patriarch) on May 20, 2014 at 08:58 UTC

    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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1086748]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-04-25 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found