Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: For Loops and Reversing output

by ikegami (Pope)
on Dec 13, 2006 at 06:31 UTC ( #589496=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @reversed = reverse @sorted;
    for my $i (0..$#reversed) {
       print $reversed[$i], "\n";
    }
    
  2. or download this
    for (my $i=$#sorted; $i>=0; $i--) {
       print $sorted[$i], "\n";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-12-27 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls