No such thing as a small change | |
PerlMonks |
Re: Print some lines in a rangeby chuckbutler (Monsignor) |
on Mar 05, 2010 at 01:02 UTC ( [id://826852]=note: print w/replies, xml ) | Need Help?? |
There is a conflict between using command line option, switch, '-p' which sets up a loop around the '-e' code and using '@lines=<>' which reads the whole file(s), know as a slurp, into the list. A '-p' loop looks like:
Depending on what you are doing, the following may be better:
This one-liner prints record 41900..50000, zero relative. It will end on record 50001, which should let you have the target file a little sooner. Good luck. -c
In Section
Seekers of Perl Wisdom
|
|