Help for this page

Select Code to Download


  1. or download this
    $num_matches_stuff = $str =~ m/(stuff)/g;
    @all_the_matches   = $str =~ m/(stuff)/g;
    
  2. or download this
    $str = "stuff stuff stuff";
    $num_matches_stuff = $str =~ m/(stuff)/g;
    print $num_matches_stuff;
    
  3. or download this
    $str = "stuff stuff stuff";
    while($str =~ m/(stuff)/g) {
        print "Got one!\n";
    }