title: How can I store regex captures in an array in Perl?
body: <p>Is it possible to store all matches for a regular expression into an array?</p>
  
  <p>I know I can use <code>($1,...,$n) = m/expr/g;</code>, but it seems as though that can only be used if you know the number of matches you are looking for. I have tried <code>my @array = m/expr/g;</code>, but that doesn't seem to work.</p>