my $string = "Here is some TEXT."; { my $teststr = lc $string; if ( $teststr =~ m/text/ ) { print "$string matched.\n"; } }