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

Re: printing every 2nd entry in a list backwards

by 1nickt (Canon)
on May 19, 2017 at 12:43 UTC ( [id://1190606]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @x = (1, 22, 3, -4 );
    print join " ", grep { state $i; $i++ % 2 == 0 } reverse @x;
    

Log In?
Username:
Password:

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

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

    No recent polls found