Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Perl 5 (and probably Perl 6) *can* be used to write scripts. That doesn't necessarily mean that it's a scripting language (implying that it can only be used for that purpose).

I define a script as something that looks like a script for a play. That is, it has a list of instructions which should be executed in order. There may be the odd sub-routine, but these are mostly in the same file (of course, with Perl, there may be various calls to CPAN modules, but the code specific to this operation is more or less all in once place). Of course there are no hard and fast rules (i.e. you *could* push some of it into a module), but we're talking about a matter of style here.

One way of writing bad Perl (and there are many, TIMTOWDI applies even here) is to attempt to extend this style for use in applications. I'm sure we've all seen this first hand: huge if/elsif/else structures, requires all over the place, global variables used without regard for the future maintainer's sanity. Some of us (myself included) may have even written code like this.

The scripting style is certain useful for small, fairly self contained pieces of code. Or for one-shot jobs that are again fairly simple. Any other use is probably a bad idea.

I think one reason why people who don't know Perl well have difficulty in understanding the difference between a language that can be used for scripting, and a language that can *only* be used for scripting, is that many languages only allow one style. Perl, of course, allows many.

Additionally, many junior programmers don't really understand the concept of coding style. They just use whatever works. That's why, when you ask them to write a more complex application, they may use the scripting style they've always used.

These things can contribute to a bad (but undeserved) reputation for Perl.

In reply to Re: Let's face it, Perl *is* a scripting language by Mutant
in thread Let's face it, Perl *is* a scripting language by Ovid

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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others about the Monastery: (4)
    As of 2025-06-25 07:48 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?
      erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.