Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: complementary array indices (5.10)

by lodin (Hermit)
on May 12, 2009 at 00:07 UTC ( #763390=note: print w/replies, xml ) Need Help??


in reply to complementary array indices

If you have Perl 5.10 you can do

use 5.010; my @a = (1, 3, 5); my @b = qw/ 0 x 2 x 4 x 6 7 8 9 /; print @b[grep { not $_ ~~ @a } 0 .. $#b]; __END__ 0246789

lodin

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2022-01-27 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?