in reply to regex return true instead of false

Please note that if
    $args =~ /\-rs(\s+)(\S+)/ || $args =~  /\-p(\s+)(\S+)/ || $args =~  /\-P(\s+)(\S+)/
actually works for your purposes, it can be simplified to
    $args =~ m{ - (?: rs | p | P) (\s+) (\S+) }xms
or its negation
    $args !~ m{ - (?: rs | p | P) (\s+) (\S+) }xms
and you need not torture your brain with De Morgan's laws. And (?: rs | p | P) could be further simplified to (?: rs | [pP]) although I find the first form a bit neater somehow.


Give a man a fish:  <%-{-{-{-<