[Chicago-talk] removing line from file.

Andy_Bach at wiwb.uscourts.gov Andy_Bach at wiwb.uscourts.gov
Wed Mar 9 12:42:37 PST 2005

Larry thought of everything ...
perldoc perlop
 Binary ".." is the range operator, which is really two   different 
operators depending on the context.
In scalar context, ".." returns a boolean value.  The
     operator is bistable, like a flip-flop, and emulates the
     line-range (comma) operator of awk, and various
     editors.  Each ".." operator maintains its own boolean
     state.  It is false as long as its left operand is false.
     Once the left operand is true, the range operator stays true
     until the right operand is true, AFTER which the range
     operator becomes false again.  It doesn't become false till
     the next time the range operator is evaluated.  It can test
     the right operand and become false on the same evaluation it
     became true (as in awk), but it still returns true once.  If
     you don't want it to test the right operand till the next
     evaluation, as in sed, just use three dots 
("...") instead
     of two.  In all other regards, "..." behaves just like ".."
 If either operand of scalar ".." is a
     constant expression, that operand is implicitly compared to
     the $. variable, the current line number.


Andy Bach, Sys. Mangler
Internet: andy_bach at wiwb.uscourts.gov 
VOICE: (608) 261-5738  FAX 264-5932

In 1968 it took the computing-Power of 2 C-64 to fly a rocket to the moon.
Now, 1997 it takes the Power of a Pentium 133 to run Microsoft Windows 95.
                    Something must have gone wrong.

More information about the Chicago-talk mailing list