Help for this page

Select Code to Download


  1. or download this
    $count = @count = $data =~ m/and/g; and it works ok
    
  2. or download this
    $count = () = $data =~ m/and/g;
    
  3. or download this
    $_ = 'foo and bar and baz went to the sea.';
    @pairs = /(and)(?=\W*(\w+))/g;
    print join "#", @pairs;
    
  4. or download this
    $data = 'foo and bar and baz went to the sea.';
    @pairs = $data =~ /(and)(?=\W*(\w+))/g;
    print "@pairs";
    
  5. or download this
    @pairs = /(and)(?=\W*(\w+))/g;
    
  6. or download this
    @pairs = $data =~ /(and)(?=\W*(\w+))/g;