Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 wandering the Monastery: (13)
As of 2014-07-23 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (150 votes), past polls