in reply to Comparing arrays and returning false if an exception is found
translates into English as: if any (non-zero returned by grep) of @SupportedPTs are keys in %seen (with corresponding true values).if (grep($seen{$_}, @SupportedPTs) )
You want "if any of @SupportedPTs are NOT keys in %seen":
(with your if and else blocks reversed) or perhaps "if none (zero returned by grep) of @SupportedPTS are NOT keys in %seen":if (grep(! $seen{$_}, @SupportedPTs) )
with the if and else blocks unchanged.if (! grep(! $seen{$_}, @SupportedPTs) )
|
|---|