Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: The Scalar Range Operator

by hossman (Prior)
on Jul 27, 2004 at 01:53 UTC ( #377632=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://377632]
help
Chatterbox?
[Corion]: holli: Nice ;)
[moritz]: you could add a whenever signal(SIGTERM) { ... } handler for a clean exit

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2017-09-23 12:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (272 votes). Check out past polls.

    Notices?