Some Perl
作者:gugod 發佈於: ,更新於:To see if @a
is a subset of @b
in Perl, use this:
all(@a) == any(@b)
With all
and any
exported from Quantum::Superposition. I think it's brilliant that th
at it's very different from:
any(@b) == all(@a)
Which will be true only if all elements in @a
are the same as anyone one element in @b
. Quantum::Superposition is so brilliant but should really be renamed or aliased to some shorter name. Or can just be a part of "feature" pragma.