title: Extract the required substring from another string -Perl
body: <p>I want to extract a substring from a line in Perl.  Let me explain giving an example:</p>
  
  <pre><code>fhjgfghjk3456mm   735373653736
  icasd 666666666666
  111111111111
  </code></pre>
  
  <p>In the above lines, I only want to extract the 12 digit number. I tried using <code>split</code> function:</p>
  
  <pre><code>my @cc = split(/[0-9]{12}/,$line);
  print @cc;
  </code></pre>
  
  <p>But what it does is removes the matched part of the string and stores the residue in <code>@cc</code>. I want the part matching the pattern to be printed. How do I that?</p>