$. uninitialized if there's no file open for reading (undef). undef is false. In a numeric comparison, undef is promoted to zero (or conceptually better, zero is demoted to false, and undef is promoted to false). Consequently, 0 .. is true, and the flip flop flips.
If warnings were enabled you'd get one. :)
Dave
In reply to Re^3: grep flip flop (range operator)
by davido
in thread grep flip flop (range operator)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |