Pierre-

You seem to have some other language mixed in here.
I'm not clear on what it is you want.

But try these:
Code:
my $str = "Hello World!";
my $pattern = "hello";

if ($str !~ m/$pattern/g){
print "no match1!\n";
}

##ignore case
if (lc($str) =~ m/$pattern/g){
print "match2!\n";
}
...