in reply to regex return true instead of false

It looks like you may need:

if ( $args !~ /\-rs(\s+)(\S+)/ && $args !~ /\-p(\s+)(\S+)/ && $args !~ + /\-P(\s+)(\S+)/ ) { $args .= " --rs $str"; }