in reply to regex return true instead of false
d:\exp>perl -MO=Deparse,-p -e"if (! $args =~ /\-rs(\s+)(\S+)/ && ! $ar +gs =~ /\-p(\s+)(\S+)/ && ! $args =~ /\-P(\s+)(\S+)/){1}" if (((((!$args) =~ /\-rs(\s+)(\S+)/) and ((!$args) =~ /\-p(\s+)(\S+)/) +) and ((!$args) =~ /\-P(\s+)(\S+)/))) { '???'; } -e syntax OK
I'd say either use not instead of ! or just !~ instaed of =~
and I'd also recommend using and instead of &&
you might be interested in reading
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|