Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Answer: Are the scripts interpreted or compiled?

by Elian (Parson)
on May 31, 2002 at 18:40 UTC ( #170802=categorized answer: print w/replies, xml ) Need Help??

Q&A > CGI programming > Are the scripts interpreted or compiled? - Answer contributed by Elian

Much as I like perl, this first answer is incorrect.

Perl is certainly not the most perfect combination if interpreter and compiler. It's arguable whether there is one, but if there is then what we have now isn't it.

While, strictly speaking, perl does have a compilation phase, transforming your source into an intermediate internal representation, it doesn't produce natively executable code. Producing that native code is what's generally associated with compilation. Instead it produces the intermediate code and walks through it, interpreting it.

Given the current state of the art (at this point only a few shells are truly interpretive, not turning their code into some intermediate form) perl comfortably fits the definition of "interpreter"

(Also, perl doesn't produce and interpret bytecode. It produces and walks an optree, which is a different structure altogether)

  • Comment on Answer: Are the scripts interpreted or compiled?
Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2020-10-25 04:07 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (249 votes). Check out past polls.