Perl FAQ 1.8: Is it a perl program or a perl script?

Perl FAQ 1.8

Is it a perl program or a perl script?

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 is what you give an actor, but a program is what you give an audience.


Other resources at this site: