You might want to consider changing some of your examples so that they don't lie on edge cases (that way it's more obvious what's happening). For example...
while (<DATA>) { print if 2 .. 3; }
...might be more instructive as...
while (<DATA>) { print if 2 .. 4; }
Likewise for ...
while (<DATA>) { print if 1 .. /end/; }
...and...
while (<DATA>) { print if 2 .. /end/; }
In reply to Re: The Scalar Range Operator
by hossman
in thread The Scalar Range Operator
by pbeckingham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |