http://qs321.pair.com?node_id=600144


in reply to Perl is a compiler cum interpreter?

A compiler runs over source code and generates output code without executing the output code. Generally the output winds up as native machine code that is subsequently executed in a different context.

An interpreter runs over source code and executes it as it goes (possibly compiling fragments into an intermediate representation).

Perl does both. It runs over the source code and compiles it into an intermediate form. It then "interprets" the intermediate form. Note that this gets somewhat more interesting when eval is involved because the code fragment passed into eval needs to be compiled and interpreted in its turn.

Update fix stupidty and add documentation links for eval


DWIM is Perl's answer to Gödel