A flexible and full-featured language
A (too) short overview of Perl's treasures:
- Imperative, functional and object-oriented programming
- Numerous libraries (programming efficiency).
- Compliant with all POSIX system calls.
- Native threads.
- Native and complete Unicode support.
- Recursion, modularity, exceptions, introspection.
- Operators overloading, closures.
- Simple and flexible data structures, autovivification.
- Native hash tables, arrays and lists.
- Automatic memory management (garbage collector).
- The most advanced regular expression processor.
- Ease of file manipulation, conforming to Unix standards.
- Multiplatform (87 ports).
- Easy to learn syntax (C, sh, sed, POSIX, etc).
- Built-in debugger.
References and object-oriented programming
References allow accessing data by their addresses. Their use is safe (no pointer arithmetics, unlike C or C++) and flexible (unlike Java). Anonymous references and garbage collection make memory management easy.
All object-oriented programming features are available in Perl:
- classes and instances
- methods and static fields
- multiple inheritance
- polymorphism
- encapsulation
- dynamic typing...
Moreover, many modules raise the abstraction level, simplify object creation and use, or even allow a complete change in the way objects are treated and used. There is more than one way to do OO too...
Here is a short selection of modules among the tens of thousands available on CPAN (http://search.cpan.org/) :
- Network protocols : Net::SMTP, Net::POP3, Net::DNS, Net::Jabber, Net::Bluetooth, Net::CDP (Cisco) (and several hundreds more).
- Databases : DBI, DBD::Oracle, DBD::MySQL, DBD::PostgreSQL, DBD::ODBC, DBD::ADO, DBD::DB2, DBD::Informix, DBD::InterBase (more than 70 drivers available).
- ORM : DBIx::DataModel, Class::DBI, DBIx::Class, Rose::DB::Object, Tangram, Alzabo.
- XML and SGML : XML::LibXML, XML::Twig, HTML::TreeBuilder
- Templating systems : Template Toolkit, Mason, Petal (TAL).
- Modern web frameworks : Catalyst, Jifty, Maypole, Mason.
- Office documents processing : Spreadsheet::WriteExcel, Spreadsheet::ParseExcel, OpenOffice::OODoc, RTF::Writer, RTF::Parser, PDF::API2.
- Generation and manipulation of images and graphics : ImageMagick, GD, SWF::Builder (Flash), OpenGL, Chart et leurs nombreux dérivés.
- GUIs : Tk, Gtk, WxWidgets, Qt, Win32::GUI (Windows), Mac::Glue (Mac OS X).
- Integration with other languages : Inline::C, Inline::Python, Inline::Ruby, Inline::Java (more than 40 languages available).
- Cooperative object environment: POE and its many components.
- Precision math : Math::BigInt, Math::BigFloat, PDL.
- Bioinformatics: BioPerl project.