Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: For Loops and Reversing output

by ikegami (Patriarch)
on Dec 12, 2006 at 00:33 UTC ( [id://589197]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @sorted = sort @unsorted;
    for (my $i=$#sorted; $i>=0; $i--) {
       print $sorted[$i], "\n";
    }
    
  2. or download this
    
    use strict;
    ...
       b_cmp_a  => $b_cmp_a,
       reversed => $reversed,
    });
    
  3. or download this
    >perl 589197.pl 1000 -3
              Rate neg_step  b_cmp_a reversed    neg_i
    ...
    neg_step 22.7/s       1%       --      -1%      -1%
    neg_i    22.8/s       2%       1%       --      -1%
    reversed 23.0/s       2%       1%       1%       --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-18 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found