Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 surveying the Monastery: (8)
As of 2015-07-30 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls