Syntactic Confectionery Delight | |
PerlMonks |
Re: How is a perl program processed ?by robartes (Priest) |
on Apr 01, 2003 at 06:38 UTC ( [id://247159]=note: print w/replies, xml ) | Need Help?? |
Perl is somewhat of a hybrid between interpreted and compiled languages. There is indeed an interpreter that interprets the scripts, but it does not execute the interpreted code directly. Rather, it builds bytecode that in it's turn gets executed. The generation of the bytecode can be seen as a compilation step.
If you're interested, you can have a look at the bytecode of a script using the B::Bytecode module. For example: The file bytecode contains the bytecode. In Perl6, this will be taken to the next step, and there will be a bytecode interpreter that's seperate from the Perl interpreter. This is parrot. Update: As diotalevi rightly (if rather succinctly ;) ) points out, there is no bytecode. In fact, what I mistakingly and confusingly call bytecode, is in fact a serialisation of the internal optree the Perl interpreter generates. So, substitute 'optree' for 'bytecode' in the above, and you get an equally confusing, yet more correct explanation. CU
In Section
Seekers of Perl Wisdom
|
|