Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is it a perl program or a perl script?

Perl program Script
0
Posted

Is it a perl program or a perl script?

0

It depends on whether you are talking about the perl binary or something that you wrote using perl. And, actually, even this isn’t necessarily true. “Standard” UNIX terminology is (roughly) this: programs are compiled into machine code once and run multiple times, scripts are translated (by a program) each time they are used. However, some say that a program is anything written which is executed on a computer system. Larry considers it a program if it is set in stone and you can’t change it, whereas if you can go in and hack at it, it’s a script. Of course, if you have the source code, that makes just about anything a script. 😉 In general, it probably doesn’t really matter. The terms are used interchangeably. If you particularly like one or the other, use it. If you want to call yourself a perl programmer, call them programs. If you want to call yourself a perl scripter, call them scripts. Randal* and I (at least) will call them hacks. (See question 2.10 😉 Larry says that a script

0

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 mark

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.