Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: the '..' operator and decreasing values

by Anonymous Monk
on Mar 07, 2005 at 09:46 UTC ( [id://437167]=note: print w/replies, xml ) Need Help??


in reply to Re: the '..' operator and decreasing values
in thread the '..' operator and decreasing values

Because that would be another useless warning. I write
for ($x .. $y) { .. }
quite often, knowing that it will not do anything if $y < $x.
@a = 1 .. 3 # 3-element list @a = 1 .. 2 # 2-element list @a = 1 .. 1 # 1-element list @a = 1 .. 0 # 0-element list
The latter to be a 2 element list would be very surprising (and would require a lot of extra code in my programs).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://437167]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found