title: Matching a regular expression multiple times with Perl
body: <p>Noob question here. I have a very simple perl script and I want the regex to match multiple parts in the string</p>
  
  <pre><code>my $string = "ohai there. ohai";
  my @results = $string =~ /(\w\w\w\w)/;
  foreach my $x (@results){
      print "$x\n";
  }
  </code></pre>
  
  <p>This isn't working the way i want as it only returns <em>ohai</em>. I would like it to match and print out <em>ohai ther ohai</em></p>
  
  <p>How would i go about doing this.</p>
  
  <p>Thanks</p>