title: What does =~ mean in Perl?
body: <blockquote>
  <p><strong>Possible Duplicate:</strong> <br/>
  <a href="https://stackoverflow.com/questions/10019049/what-does-this-do-in-perl">What does =~ do in Perl?</a></p>
  </blockquote>
  
  <p>In a Perl program I am examining (namly <a href="https://github.com/captn3m0/Scripts/blob/master/plutil.pl" rel="nofollow noreferrer">plutil.pl</a>), I see a lot of <code>=~</code> on the XML parser portion. For example, here is <code>UnfixXMLString</code> (lines <code>159</code> to <code>167</code> on 1.7):</p>
  <pre class="lang-perl prettyprint-override"><code>sub UnfixXMLString {
      my ($s) = @_;
  
      $s =~ s/&amp;lt;/&lt;/g;
      $s =~ s/&amp;gt;/&gt;/g;
      $s =~ s/&amp;amp;/&amp;/g;
  
      return $s;
  }
  </code></pre>
  <p>From what I can tell, it's taking a string, modifying it with the <code>=~</code> operator, then returning that modified string, but what <em>exactly</em> is it doing?</p>