A compiler is distinguished by the fact that it produces 'object code' as output and does not execute it (though some options may exist to run further programs afterwards). Before execution is performed, all object files that make up the program need to be linked together, before the resulting executable memory image can be loaded into memory for execution.

Conversely, a scripting language is a sort of slang for using a type of interpreted language that under unix and linux can select its interpreter program that will actually execute after reading the script into memory, via the special "comment" on the first line, e.g.

#!/usr/bin/perl

When executing such a Perl script and examining what programs are running in memory before it finishes, (e.g. in unix with the ps command) you will find that the Perl interpreter specified in this magic line is running, not your Perl script or any compiled or linked by-product of it and this demonstrates that it has not been compiled.

Update: BUT Perl becomes a compiler or cross-compiler if it is used to generate object or C-code for eventual loading or linking by another program rather than executing the source at once. So one could argue it is everything it can do: a scripting language, a compiler, an interpreter...

-M

Free your mind


In reply to Re: perl is an scripting language or programming language? by Moron
in thread perl is an scripting language or programming language? by perladdict

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.