in reply to Will the range operator help you?
in thread How to remove lines out of an ascii file

The operator you speak of is not the range operator, but is in fact the flip-flop operator (oooh, it's a sneaky one!). I believe this was grabbed from AWK, and is *uber* handy when doing text processing (like AWK). You can have all sorts of funky variations on the above, from fancy regexps to simple line numbers. I shall use the example from the always informative perl docs (man perlop) -
if (101 .. 200) { print; } # print 2nd hundred lines next line if (1 .. /^$/); # skip header lines s/^/> / if (/^$/ .. eof()); # quote body # parse mail messages while (<>) { $in_header = 1 .. /^$/; $in_body = /^$/ .. eof(); # do something based on those } continue { close ARGV if eof; # reset $. each file }
Indeed a thing of beauty!
HTH

broquaint