[Dub-pm] what's Perl used for anyway?

Aidan Kehoe kehoea at parhasard.net
Thu Sep 30 09:35:01 CDT 2004

 Ar an t-ochtú lá is fiche de mí Méan Fómhair, scríobh John Day: 

 > I work in Perl in a Win32 environment, and use it for everything from
 > parsing XML files and throwing the results into excel, to parsing weblogs
 > and generating graphs, monitoring servers, ftp and general personal
 > screen scrapping and a good bit more.

I work in an SMS services company, our backend programs are all written in
Perl on Unix, talking to MySQL databases, while the web front ends are
written in PHP. I inherited this setup, and I'm entirely happy with it, save
that MySQL is a fucking toy and you should never use it for anything other
than playing with.

I considered moving the backend programs to Eiffel when I started, in the
interests of maintainability--with a language as big as Perl (and C++ has
this problem too) you can initially learn and stick to one corner of it and
then be totally fazed by a program written by someone else who uses other
corners of it. What made us choose not to in the end was that the POSIX API
available for SmallEiffel is incomplete--personally, I think in terms of
symlinks and signals and setsid and sysconf, and I think that's the most
effective way to write good programs on Unix--and Perl is pretty
maintainable if you thoroughly comment any iffy decisions thoroughly and add
in enough Carp::* statements when things go wrong.

Plus, the breadth and quality of CPAN are a huge plus for Perl. Software
that has a test suite run every time it's installed, to do almost anything
you could want to (your web host's version of Perl is 5.6, and thus the
funky UTF-8 processing you wrote is broken? Install Text::Iconv, and magic!
you have an alternative!) is a huge selling point for the language.

Perl's performance isn't an issue--all the bad performance we've ever had
has been down to badly-chosen algorithms, and people can program like
OO-obsessed lazy-loading-is-for-the-weak ninnies in any language. (Though
you would admittedly need a _lot_ of energy to do it in C. :-)

Like the early Christians, Marx expected the millennium very soon; like
their successors, his have been disappointed--once more, the world has shown
itself recalcitrant to a tidy formula embodying the hopes of some section of
mankind. (Russell)

More information about the Dublin-pm mailing list