Embeddible, Extensible
The guts of Perl is defined well enough that it becomes a relatively straightforward task to embed the Perl compiler/interpreter inside another application, or to extend Perl by connecting it with arbitrary code written in C/C++ (or having a C-like interface). In fact, about a third of the on-line documentation for Perl is specifically devoted to embedding and extending Perl. The perlembed, perlapi, perlxs, perlxstut, perlguts, and perlcall documentation pages cover these topics in depth.
And because Perl is freely reusable, you can write your proprietary spreadsheet application, using an embedded Perl to evaluate the expressions in your spreadsheet cells, and not have to pay one cent in royalties for all that power. Joy.
Security Matters
Perl was designed
with security in mind. See Chapter 6 of Programming
Perl or the perlsec documentation
about taint checking. This is the kind of security where you trust
the writer of the program, but not the person running it, such as is
often the case with server-launched programs. The
Safe
module, covered in the
Safe
documentation and Chapter 7 of
Programming Perl, provides something else
entirely: the kind of security necessary when executing (as with
eval
) unchecked code.
Switch or Case Statements
No, Perl doesn’t really have these statements, but you can easily make them by using more basic constructs. See Chapter 2 of Programming Perl or the perlsyn documentation.
Direct I/O: sysopen, sysread, syswrite, and sysseek
Get Learning Perl on Win32 Systems now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.