Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: printing every 2nd entry in a list backwards

by KurtZ (Monk)
on May 19, 2017 at 12:01 UTC ( #1190601=note: print w/replies, xml ) Need Help??


in reply to printing every 2nd entry in a list backwards

TIMTOWTDI

You could use 2 pop in loop to extract the last 2 elements of an array.

Similarly splice

You can also count an index backwards.

  • Comment on Re: printing every 2nd entry in a list backwards

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1190601]
help
Chatterbox?
holli scratches his head
holli feels silly

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2017-09-24 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (274 votes). Check out past polls.

    Notices?