Appendix G. The Embedded Perl Interpreter

Perl is an interpreted scripting language. When a Perl script is started, it is read by the Perl interpreter, checked for errors, transformed into executable code only at runtime, and finally executed. Programs in languages such as C or C++ are checked for errors, compiled only once, and saved as binary code that can be run directly. Here the checking and compilation process takes place just once—before the program is run for the first time—whereas a Perl script is checked and compiled each time it is run. This takes place at an astounding speed, but it still takes time.

But things get worse—for each script, no matter how small it is, the heavyweight Perl interpreter is loaded every time. It's as if, in ...

Get Nagios, 2nd Edition 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.