FAQ 1.13 Is it a Perl program or a Perl script?

FAQ 1.13 Is it a Perl program or a Perl script?

am 03.09.2007 21:03:02 von PerlFAQ Server

This is an excerpt from the latest version perlfaq1.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

------------------------------------------------------------ --------

1.13: Is it a Perl program or a Perl script?

Larry doesn't really care. He says (half in jest) that "a script is what
you give the actors. A program is what you give the audience."

Originally, a script was a canned sequence of normally interactive
commands--that is, a chat script. Something like a UUCP or PPP chat
script or an expect script fits the bill nicely, as do configuration
scripts run by a program at its start up, such .cshrc or .ircrc, for
example. Chat scripts were just drivers for existing programs, not
stand-alone programs in their own right.

A computer scientist will correctly explain that all programs are
interpreted and that the only question is at what level. But if you ask
this question of someone who isn't a computer scientist, they might tell
you that a *program* has been compiled to physical machine code once and
can then be run multiple times, whereas a *script* must be translated by
a program each time it's used.

Now that "script" and "scripting" are terms that have been seized by
unscrupulous or unknowing marketeers for their own nefarious purposes,
they have begun to take on strange and often pejorative meanings, like
"non serious" or "not real programming". Consequently, some Perl
programmers prefer to avoid them altogether.



------------------------------------------------------------ --------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in
perlfaq.pod.

--
Posted via a free Usenet account from http://www.teranews.com

Re: FAQ 1.13 Is it a Perl program or a Perl script?

am 04.09.2007 19:17:21 von Michele Dondi

On Mon, 3 Sep 2007 12:03:02 -0700, PerlFAQ Server
wrote:

>1.13: Is it a Perl program or a Perl script?
>
> Larry doesn't really care. He says (half in jest) that "a script is what
> you give the actors. A program is what you give the audience."

Also see the next to last (hope this is the correct English way to say
that) entry at . (In fact, I
suggested it.)


Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^ ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,

Re: FAQ 1.13 Is it a Perl program or a Perl script?

am 04.09.2007 19:32:13 von usenet

On Sep 4, 10:17 am, Michele Dondi wrote:
> Also see the next to last (hope this is the correct English way to say
> that)

You could say 'penultimate.' But 'next to last' works fine.

FWIW, 'antepenultimate' means third from last (really).

--
David Filmer (http://DavidFilmer.com)

Re: FAQ 1.13 Is it a Perl program or a Perl script?

am 05.09.2007 19:35:56 von brian d foy

In article , Michele Dondi
wrote:

> On Mon, 3 Sep 2007 12:03:02 -0700, PerlFAQ Server
> wrote:
>
> >1.13: Is it a Perl program or a Perl script?
> >
> > Larry doesn't really care. He says (half in jest) that "a script is what
> > you give the actors. A program is what you give the audience."
>
> Also see the next to last (hope this is the correct English way to say
> that) entry at . (In fact, I
> suggested it.)

Larry said in his State of the Onion at this year's OSCON that he still
likes to think of some of his Perl as "scripts",and specificly reacted
against Andy's agenda to strike that word from our vocabulary.

--
Posted via a free Usenet account from http://www.teranews.com

Re: FAQ 1.13 Is it a Perl program or a Perl script?

am 05.09.2007 21:55:04 von Aaron Sherman

On Sep 5, 1:35 pm, brian d foy wrote:

> Larry said in his State of the Onion at this year's OSCON that he still
> likes to think of some of his Perl as "scripts",and specificly reacted
> against Andy's agenda to strike that word from our vocabulary.

I'm all for removing the word "script" from the lingo once P6 rolls
around (another conversation entirely, of course). However, in the
Perl 5 world, I don't think you can reasonably remove the word. It's
just too much of how we think about the language. I'm not saying that
it's a good word to use. I think that the term has always implied a
level of sophistication that was less than "real programs," and I'd
like to move away from that sense.

I just don't think we can do that with the culture as it is.

Re: FAQ 1.13 Is it a Perl program or a Perl script?

am 06.09.2007 02:53:30 von Anno Siegel

On 2007-09-05 21:55:04 +0200, Aaron Sherman said:

> On Sep 5, 1:35 pm, brian d foy wrote:
>
>> Larry said in his State of the Onion at this year's OSCON that he still
>> likes to think of some of his Perl as "scripts",and specificly reacted
>> against Andy's agenda to strike that word from our vocabulary.
>
> I'm all for removing the word "script" from the lingo once P6 rolls

Why would you want to do that?

The term "script" makes a useful distinction, though its opposite
wouldn't be "program" (a script is a program too), but "binary executable"
or some such. Some programs are scripts, meaning that the source text
*is* the executable file. In others the source is distinct from the
executable. In practical terms this means that you can modify a script
when you can read it, but not a binary, which is an important distinction.

In this terminology, a Perl program would clearly be a script, never mind
Perl 5 or 6. That the term is occasionally used with disparaging intent
shouldn't stop us from using it in useful ways.

Anno

Re: FAQ 1.13 Is it a Perl program or a Perl script?

am 06.09.2007 18:10:22 von brian d foy

In article <5k91caF2lpqaU1@mid.dfncis.de>, Anno Siegel
wrote:

> On 2007-09-05 21:55:04 +0200, Aaron Sherman said:


> In this terminology, a Perl program would clearly be a script, never mind
> Perl 5 or 6. That the term is occasionally used with disparaging intent
> shouldn't stop us from using it in useful ways.

Indeed. I don't think most people even care. The very few that do have
other problems with Perl that a change of semantics isn't going to
change. :)

--
Posted via a free Usenet account from http://www.teranews.com