Is Perl compiled or interpreted?

Perl compiles your whole program to an internal tree of operations before it runs, and then it runs the tree. It does not produce bytecode, and it has no JIT.

How it runs your code

Perl 5 builds an op tree in memory and executes it by walking the tree in order. The tree is not saved to disk, so Perl has no bytecode file the way Python has .pyc files. Perl is therefore not quite a bytecode virtual machine, and it is not a line-by-line interpreter either.

Does that make Perl slow?

We have not measured Perl on this site. Perl has no JIT, so its speed comes from the care that went into the interpreter loop and its operations.

Questions

Is Perl interpreted or compiled?

Both words fit loosely. Perl compiles the whole program to an op tree first, then executes the tree.

Does Perl compile to bytecode?

No. Perl keeps an op tree in memory. It does not save bytecode.

Does Perl have a JIT?

No mainstream Perl implementation has a JIT.

Related

Is Python compiled? · Is Ruby compiled? · Is Lua compiled? · Compiled vs interpreted · Why optimization decides speed