title: Perl pattern matching where we print all matching parts, but only the matching parts (not the rest)
body: <p>I am looking for a solution to do this in Perl.</p>
  
  <p>Example:
  If my string is:</p>
  
  <pre><code>my $content = 'toto /app/blah titi\nhuh/app/ttt wew';
  </code></pre>
  
  <p>and my pattern is: <code>/app/something</code> I want to get as output in an array: <code>/app/blah</code> and <code>/app/ttt</code>.</p>
  
  <p>(which is basically what <code>grep -E -o '\/app\/[a-z]*'</code> does)</p>
  
  <p>I can't get it work !
  I tried:</p>
  
  <pre><code>my $content = 'toto /app/blah titi\nhuh/app/ttt wew';
  $content =~ m/(\/app\/[a-z]*)/;
  print "Group: $1 $2\n";
  </code></pre>
  
  <p>but this only prints: <code>/app/blah</code> (not <code>/app/ttt</code>)</p>
  
  <p>and anyway, I don't know how to put the results in a table:</p>
  
  <pre><code>my (@table) = @_;
  </code></pre>
  
  <p>the table does not contain anything!</p>
  
  <p>thx</p>