Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 rifling through the Monastery: (9)
As of 2016-07-01 12:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (411 votes). Check out past polls.