good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Finding wether all elements of one array are in anotherby tsk1979 (Scribe) |
on Mar 31, 2006 at 09:09 UTC ( [id://540417]=perlquestion: print w/replies, xml ) | Need Help?? |
tsk1979 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
consider an array @a and an array @b. I want to find out wether all the elements of @a are there in @b
for example
@a = (-true, -depth=1)
@b = (-search, -depth=1, -true, -expand_all...)
In the above case the command should return true, all the elements in @a are in @b. I implemeted this foreach
This is a bit tedious method. Could you suggest a short method or something more elegent
Back to
Seekers of Perl Wisdom
|
|