Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: For Loops and Reversing output

by ikegami (Patriarch)
on Dec 13, 2006 at 06:31 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://589496]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found