It's not what programming languages do, it's what they shepherd you to (2020)
This shows how much programmers hate distraction. Perl doesn&#x27;t really shepherd you into regexp, it&#x27;s just easy to s&#x2F;&#x2F;&#x2F; in it, so you think: hmm, searching for a good xml library takes time, replacing is fast and non-distracting. In C, replacing in a string is so much harder, so you&#x27;re okay with setting up a parser and using it. If only Perl had this <i>out of box</i>:<p><pre><code>  use xml;

  foreach (xml::select(&lt;STDIN&gt;, &quot;item[color=orange]&quot;)) {
    $_-&gt;setattr(&quot;color&quot;, &quot;red&quot;)
  }
  print(xml::result)
</code></pre>
But just install XML::Parser you could say! Well, look here: [123] and tell how to do the above from it quickly. You can&#x27;t. You still want regexp-like selector thing and Perl semantics, not just a deep hash of hashes of arrays of hashes which loses Perl&#x27;s appeal instantly.<p>Better languages have better tools to work with out of box, and these tools match the language spirit. There is no XML Parser for Perl on CPAN, they all are for some other language that Perl isn&#x27;t.<p>[1] <a href="https:&#x2F;&#x2F;metacpan.org&#x2F;pod&#x2F;XML::Parser" rel="nofollow">https:&#x2F;&#x2F;metacpan.org&#x2F;pod&#x2F;XML::Parser</a><p>[2] <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;487213&#x2F;whats-the-best-xml-parser-for-perl" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;487213&#x2F;whats-the-best-xm...</a><p>[3] <a href="https:&#x2F;&#x2F;metacpan.org&#x2F;pod&#x2F;XML::LibXML" rel="nofollow">https:&#x2F;&#x2F;metacpan.org&#x2F;pod&#x2F;XML::LibXML</a>