Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: complementary array indices

by rir (Vicar)
on May 12, 2009 at 17:30 UTC ( #763548=note: print w/ replies, xml ) Need Help??


in reply to complementary array indices

When I was doing this, the @indices array was presorted.

my @arry = qw{ 10 11 12 13 14 15 16 17 18 }; my @indices = qw{ 3 5 1 }; my @remainder = ( 0 .. $#arry ); splice @remainder, $_, 1 for reverse sort { $a <=> $b }@indices; $,=","; print @remainder, $/; __DATA__ 0,2,4,6,7,8,
Be well,
rir


Comment on Re: complementary array indices
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-10-22 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls