Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 romping around the Monastery: (8)
As of 2014-09-03 09:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls