title: How can I find a substring within a string using Perl?
body: <p>I have a string from which I wish to extract a single word, but with a numerical appended to it, which might be different in each line:</p>
  <pre><code>This is string1 this is string
  This is string11 
  This is string6 and it is in this line
  </code></pre>
  <p>I want to parse this file and get the values of &quot;stringXXX&quot;, starting from 0 to 100</p>
  <pre><code># suppose ABC.txt contains the above lines
  FH1 = open &quot;Abc.txt&quot;; 
  @abcFile = &lt;FH1&gt;;
  
  foreach $line(@abcFile) {
      if ($pattern =~ s/string.(d{0}d{100});
          print $pattern;
  </code></pre>
  <p>The above prints the whole line, I wish to get only stringXXX</p>