Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Finding wether all elements of one array are in another

by unobe (Scribe)
on Apr 02, 2006 at 05:16 UTC ( #540706=note: print w/ replies, xml ) Need Help??


in reply to Finding wether all elements of one array are in another

Eigenstates, baby! ;-)

use Quantum::Superpositions; @a = qw(-true -depth=1); @b = qw(-search -depth=1 -true -expand_all...); @c = qw(-true -depth=1 -height); print "right" unless eigenstates(any(@a) ne all(@b)); print "wrong" unless eigenstates(any(@c) ne all(@b));
Output:
right


Comment on Re: Finding wether all elements of one array are in another
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2014-10-25 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (143 votes), past polls