ovedpo15 has asked for the wisdom of the Perl Monks concerning the following question:
The idea:unless ($args =~ /\-rs(\s+)(\S+)/ && $args =~ /\-p(\s+)(\S+)/ && $args + =~ /\-P(\s+)(\S+)/) { $args .= " --rs $str"; }
Then I understood that it should have the not operator before it:if ($args =~ /\-rs(\s+)(\S+)/ || $args =~ /\-p(\s+)(\S+)/ || $args =~ + /\-P(\s+)(\S+)/) { // do nothing } else { $args .= " --rs $str"; }
But it still does not work as expected. My last guess is due to regex grouping but not sure what to do. How to solve it?unless (! $args =~ /\-rs(\s+)(\S+)/ && ! $args =~ /\-p(\s+)(\S+)/ && ! + $args =~ /\-P(\s+)(\S+)/) { $args .= " --rs $str"; }
|
|---|