For me, a 'script' is a code that I can whip together in ten minutes or less to solve an immediate problem. It implies that there are no tests, packaging, and anything more that perfunctory documentation. Often, none of the corner cases are considered, since the problem that I am sorting is very specific.

A program, on the other hand, is code that I expect to be hanging around for a while and needs the formal structure of POD, a test-harness, and a bit of thought in the design process. (Note: I often find that a script that I wrote twice last week really should become a program....)

My people in the Computer Science disciplines make the distinction between 'script' and 'program' in terms of the mechanism that is used to run them. A script is run through an Interpreter; a program is run through a Compiler. The implication is that the Interpreter does not produce a reusable intermediate structure (no 'object code') that can be saved and used again later without reprocessing the source code. This distinction has gotten badly blurred in past decade or so, what with Just In Time Compilers and Interpreters that output byte-code-objects that are executed by a VM.

----
I Go Back to Sleep, Now.

OGB


In reply to Re: perl vs script by Old_Gray_Bear
in thread perl vs script by saranperl

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.