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

Re: printing every 2nd entry in a list backwards

by KurtZ (Scribe)
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?
[james28909]: i need to fix this issue with perlmonks. i keep having the issue of someone posting something that casues the page to be very wide.
[james28909]: is there some setting i am missing?
[GrandFather]: It's either lines that your browser won't split (no white space) or nodes with <pre> tags which ought to be code tags

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2017-05-24 00:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?