The easiest way to get around precedence-issues is to define precedence yourself by using (a lot of) brackets.
So
unless (! $args =~ /\-rs(\s+)(\S+)/ && ! $args =~ /\-p(\s+)(\S+)/ && !
+ $args =~ /\-P(\s+)(\S+)/) {
will become
unless ((!($args =~ /\-rs(\s+)(\S+)/)) && (!($args =~ /\-p(\s+)(\S+)/)
+) && (!($args =~ /\-P(\s+)(\S+)/))) {
I agree it looks a bit confusing, but modern editors help you by showing the matching bracket.
And you don't have to think about rules (which might be counter-intuitive (like ! vs =~)
or different in other programming languages).
HTH, Rata