On Wed, 2006-31-05 at 12:03 +0200, [EMAIL PROTECTED] wrote:
> Hi,
> 
>   if ($_ =~ m/match string/i) {
>     if ($_ =~ m/does not match string/i) {
>     } else {
>       print $_;
> 
> Regex is not my strong point, so I'm going to ask...  Is there any way to 
> write
> that better?  Preferably only using one if statement?
> 
> if (($_ =~ m/match string/i) && ($_ =~ m/does not match string/i)) {
>   print $_;
> 
> I'm not to sure how to do the reverse of =~ for the does not match part... 

The inverse of '=~' is '!~'
See `perldoc perlop`


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to