http://www.perlmonks.org?node_id=377632


in reply to The Scalar Range Operator

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/; }