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

Re: complementary array indices

by rir (Vicar)
on May 12, 2009 at 17:30 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-03-28 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found