in reply to Finding wether all elements of one array are in another
Using a temporary hash and List::MoreUtils:
use List::MoreUtils qw(all); use strict; use warnings; my @partial = qw(-true -depth=1); my @complete = qw (-search -depth=1 -true -expand_all); my %temp; @temp{@complete} = @complete; print "Yep\n" if all { exists $temp{$_} } @partial;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Finding wether all elements of one array are in another
by jdporter (Paladin) on Mar 31, 2006 at 12:58 UTC | |
by Jenda (Abbot) on Oct 21, 2006 at 22:35 UTC |