title: Regular expression chaining/mixing in perl
body: <p>Consider the following:</p>
  <pre><code>my $p1             = &quot;(a|e|o)&quot;;
  my $p2             = &quot;(x|y|z)&quot;;
  $text =~  s/($p1)( )[$p2]([0-9])/some action to be done/g;
  </code></pre>
  <p>Is the regular expression pattern in string form equal to the concatenation of the elements in the above? That is, can the above can be written as</p>
  <pre><code>$text =~  s/((a|e|o))( )[(x|y|z)]([0-9])/ some action to be done/g;
  </code></pre>