Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: the '..' operator and decreasing values

by Woodchuck (Initiate)
on Mar 05, 2005 at 21:28 UTC ( #436962=note: print w/replies, xml ) Need Help??


in reply to the '..' operator and decreasing values

Wouldn't : foreach my $i (10 .. 0) { #Do something } do the trick instead??? -Woodchuck
  • Comment on Re: the '..' operator and decreasing values

Replies are listed 'Best First'.
Re^2: the '..' operator and decreasing values
by SolidState (Scribe) on Mar 06, 2005 at 16:47 UTC
    No, since "for" is simply an alias of "foreach", so that your code is exactly quivalent to the original poster's code.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2023-05-30 01:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?