use strict; use warnings; use Array::Utils 'intersect'; my @source = qw(Sun Moon Pluto Venus Neptune); my @target = @ARGV ? @ARGV : qw(Sun Moon); my @in = intersect @target, @source; print @in == @target ? 'Yes' : 'No';