> That's the range operator.

which is why it's documented under
  http://perldoc.perl.org/perlop.html#Range-Operators
rather than
  http://perldoc.perl.org/perlre.html

> without regexes, for instance "print if ($.==5 .. $.==20) to print lines
> five through twenty of the input.

which can be abbreviated
   print if 5..20;


I frequently use "1..1 or " to keep the header line of a data file eg

   perl -F, -lane 'print join q{,},@F[0,2,-2,-1] if 1..1 or $F[6] =~ /
\b EMA \b /ix;'  fd_2006_NED.csv



-- 
Bill
[EMAIL PROTECTED] [EMAIL PROTECTED]

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to