Scripting and programming IMHO are all about attitude. In my books scripting refers to thinking through a series of steps one by one, usually in straight line code, and just walking through a process. Programming refers to thinking about what you are doing and trying to write a program that happens to accomplish the task, applying all of your knowledge of how to program well to write a good program.

I have rather strong opinions on which is generally a better attitude to take.

It is very straightforward to approach small problems by scripting a solution, and a scripting language (IMHO) is a language that tries to make it possible to go quite far that way. Therefore Perl is a scripting language. But scripting as an approach does not scale, and so you will be able to accomplish more with Perl if you try to program. (Most Perl disaster stories are scripts that got out of control.) So learn to think of it as programming even though you might be able to script up an answer that works for now.

For more thoughts on it, Simon Cozens has a nice article called, Ten Perl Myths. On of my favorite quotes there that pretty much sums this up is, ...there's no real difference between programming and scripting- it's all just telling the computer what you want it to do...I'm going to talk about Perl programs here, but you might hear some people call them Perl scripts. The people who call them `programs' on the whole write better ones. There it is. Scripting and programming are the same activity. But if you are thinking about it as scripting, you will hit a wall sooner rather than later.

For an unexpected take on this, read The Curse of the Gifted. When you script rather than program, you are falling into a version of that trap. The general pieces of advice that ESR is giving Linus Torvalds there apply (with only minor translation) to a large number of Perl scriptors as well...


In reply to Re (tilly) 1: scripts-programs-applications by tilly
in thread scripts-programs-applications by cleen

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.