Introduction to Perl

Program compilation/interpretation

Once you type the program name in the shell command line (e.g. you type ./filename.pl) the whole program is compiled into an internal format and then immediately executed.

If there are syntax errors in the code, the compiler will tell you about them and will not run the program.

For example, try to run the following program:
#!/usr/bin/perl
print Hello, world!\n";

in which one quotation mark is omitted, and check what happens.

There is no need to manually compile the program before execution (i.e. to save a compiled version), although it is possible.


Table of Contents.
Previous| Next.