Help for this page

Select Code to Download


  1. or download this
    my $string = "This needs to match!";
    if ( $string =~ /mAtCh/i ) {
        print $string, " matched.\n";
    }
    
  2. or download this
    my $string = "Here is some TEXT.";
    {
        my $teststr = lc $string;
        if ( $teststr =~ m/text/ ) { print "$string matched.\n"; }
    }