You're replying to a comment by Dave Cross.

April 27, 2011, 16:49

The range operator is cleverer than you think. You can print lines 17 to 30 in a file like this:

perl -ne 'print if 17 .. 30'

You can (obviously) also use that for printing the first 10 lines of a file:

perl -ne '1 .. 10'

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "disk": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.