Well part of the point that I'm trying to make is that
condition should change to make the logical sense of this easier to understand.
unless ( (!($args =~ /\-rs(\s+)(\S+)/))
&& (!($args =~ /\-p(\s+)(\S+)/))
&& (!($args =~ /\-P(\s+)(\S+)/)) )
{.....
# I figure this is easier to understand:
if ( $args =~ /\-rs(\s+)(\S+)/ #update changed unless->if
or $args =~ /\-p(\s+)(\S+)/
or $args =~ /\-P(\s+)(\S+)/ )
{....
I was trained as a hardware engineer.
DeMorgan's Theorem is an important part of hardware design. An AND or an OR gate is actually pretty rare. The most common gate is NAND, followed by NOR. The reason for that is that the fastest gates have a logical inversion - that is due to the way the hardware works. Inverting that output slows things down.
Changing the formulation of condition can make things easier to understand. The compiler should generate similar code for the above examples. I just think that the second is easier for a human to understand.