Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: For Loops and Reversing output

by ikegami (Pope)
on Dec 12, 2006 at 00:33 UTC ( #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
Node Status?
node history
Node Type: note [id://589197]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-12-19 04:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (70 votes), past polls