3 ms·
Exactly. Perl is hardly readable, difficult to understand, and simple things (like parsing a XML) becomes difficult in Perl.
by p0nce 6y ago
Exactly. Perl is hardly readable, difficult to understand, and simple things (like parsing a XML) becomes difficult in Perl.
- daotoad 6y agoHow were you parsing XML? I've never found it to be a difficult task. XML::LibXML is a nice wrapper around libXML. XML::Twig is great if you need to process huge files. XML::Rabbit will seamlessly map your XML into objects. There are things to criticise Perl for, like idiosyncratic argument handling in subroutines or the use of weird punctuation variables, but to call out XML parsing as particularly hard is questionable. Take a look at this example from https://grantm.github.io/perl-libxml-by-example/basics.html https://grantm.github.io/perl-libxml-by-example/basics.html use XML::LibXML; my $filename = 'playlist.xml'; my $dom = XML::LibXML->load_xml(location => $filename); foreach my $title ($dom->findnodes('/playlist/movie/title')) { say $title->to_literal(); } How is that particularly difficult?