![](https://csdnimg.cn/release/download_crawler_static/3900719/bg14.jpg)
xviii Preface
portably, you have to put in all those strange #ifdef markings for differ ent operat-
ing systems. To program Java portably, you have to understand the idiosyncrasies
of each new Java implementation. To program a shell script portably, you have to
remember the syntax for each operating system’s version of each command and
somehow find the common factor that (you hope) works everywhere. And to pro-
gram Visual Basic portably, you just need a more flexible definition of the word
“portable”. :-)
Perl happily avoids such problems while retaining many of the benefits of these
other languages, with some additional magic of its own. Perl’s magic comes from
many sources: the utility of its feature set, the inventiveness of the Perl commu-
nity, and the exuberance of the open source movement in general. But much of
this magic is simply hybrid vigor; Perl has a mixed heritage and has always viewed
diversity as a strength rather than a weakness. Perl is a “give me your tired, your
poor” language. If you feel like a huddled mass longing to be free, Perl is for you.
Perl reaches out across cultures. Much of the explosive growth of Perl has been
fueled by the hankerings of former Unix systems programmers who wanted to
take along with them as much of the “old country” as they could. For them, Perl is
the portable distillation of Unix culture, an oasis in the desert of “can’t get there
fr om her e”. On the other hand, it also works in the other direction: Windows-
based web designers are often delighted to discover that they can take their Perl
pr ograms and run them unchanged on the company’s Unix server.
Although Perl is especially popular with systems programmers and web develop-
ers, that’s just because they discovered it first; Perl appeals to a much broader
audience. From its small start as a text-processing language, Perl has grown into a
sophisticated, general-purpose programming language with a rich software devel-
opment environment complete with debuggers, profilers, cross-r efer encers, com-
pilers, libraries, syntax-directed editors, and all the rest of the trappings of a “real”
pr ogramming language — if you want them. But those are all about making hard
things possible, and lots of languages can do that. Perl is unique in that it never
lost its vision for keeping easy things easy.
Because Perl is both powerful and accessible, it is being used daily in every imag-
inable field, from aerospace engineering to molecular biology, from mathematics
to linguistics, from graphics to document processing, from database manipulation
to network management. Perl is used by people who are desperate to analyze or
convert lots of data quickly, whether you’re talking DNA sequences, web pages, or
pork belly futures. Indeed, one of the jokes in the Perl community is that the next
big stock market crash will probably be triggered by a bug in someone’s Perl
script. (On the brighter side, any unemployed stock analysts will still have a
marketable skill, so to speak.)