Help for this page

Select Code to Download


  1. or download this
    for ("ab", "cd") {
      if ($str =~ /$_/) { ... }
    }
    
  2. or download this
    ($x, $y) = ("ab", "c");
    for (1, 2) {
      if ($str =~ /$x$y/) { ... }
      ($x, $y) = ("a", "bc");
    }
    
  3. or download this
    my @strings = make_10_strings();
    for (@strings) {
    ...
        if ($_ =~ $p) { handle($_) }
      }
    }
    
  4. or download this
    my @strings = make_10_strings();
    for (@strings) {
    ...
        if ($_ =~ $p) { handle($_) }
      }
    }