Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 lurking in the Monastery: (3)
As of 2015-08-31 02:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (351 votes), past polls