Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How do I reverse array elements?

by simmisam (Novice)
on Jan 15, 2014 at 22:19 UTC ( [id://1070735]=note: print w/replies, xml ) Need Help??


in reply to How do I reverse array elements?

my @array1 = qw(4 3 7 8 9 49 12 23 43); my @array2; for (0..$#array1) { my $popElement = pop @array1; push (@array2,$popElement); } print "@array2\n";

Replies are listed 'Best First'.
Re: Answer: How do I reverse array elements?
by dcmertens (Scribe) on Jan 16, 2014 at 02:04 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2026-03-06 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.