Welcome to the Monastery | |
PerlMonks |
Reading specific lines in a fileby gurpreetsingh13 (Scribe) |
on May 20, 2014 at 07:27 UTC ( [id://1086746]=perlquestion: print w/replies, xml ) | Need Help?? |
gurpreetsingh13 has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks, Hope this is a simple thing. Tried to search but couldn't find a reasonable solution for the same. What I want is to print line number say 60 to 70 in a file. This will work out using sed Simply using head,tail it will work out Using perl $. it will work out Using perl list context, it works out.
What I want is any way we can eliminate that @lines array and do it in one line. Tried somethings but can't make it out. e.g.
Or
But nothing works out. Would be thankful if you could help me in that.
Back to
Seekers of Perl Wisdom
|
|