LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   perl interpretive or compiled ??? (https://www.linuxquestions.org/questions/linux-newbie-8/perl-interpretive-or-compiled-4175422009/)

zahheb 08-14-2012 07:45 AM

perl interpretive or compiled ???
 
$pkg_name = "Account"; # executes at run-time
use $pkg_name; # executes at compile-time


they say perl is interpretive so where does compiling come into the picture now??

thanks

pan64 08-14-2012 08:27 AM

there is a perl compiler: http://www.perl-compiler.org/
also see this page: http://stackoverflow.com/questions/5...mming-language

chrism01 08-15-2012 02:42 AM

See this http://www.perl.com/doc/FMTEYEWTK/comp-vs-interp.html

Loosely speaking, the real perl executable eg /usr/bin/perl reads your Perl code and sort-of-compiles it into an 'executable environment' in RAM, which it then runs.
Hence its much faster than a true interpreted lang eg bash, but not quite as fast as say 'C'.
My rule of thumb is Perl is ~85% as as fast as C, all other things being equal.
If you really want to get into the details, ask over at www.perlmonks.org; where the Perl gurus hang out. :)


All times are GMT -5. The time now is 12:06 PM.