Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: For Loops and Reversing output

by Limbic~Region (Chancellor)
on Dec 12, 2006 at 00:36 UTC ( #589199=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $idx = $#array;
    while ($idx--) {
        print "$array[$idx]\n";
    }
    
  2. or download this
    my $output = '';
    for my $elem (@array) {
    ...
    }
    $output .= "\n";
    print $output;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2014-08-20 11:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (110 votes), past polls