Scripting languages are, in general, computer languages that are handled by an interpreter rather than compiled directly into an executable program by a compiler.
An interpreter is a program that examines each line of code at the time the user invokes the script, checks it for correct syntax, then executes that code. Scripting languages generally are less complex than traditional compiled languages. Script programs take longer to run than compiled programs, since they first must be handled by the interpreter rather than executed directly by the CPU.
Because of their less-complicated nature, scripting languages are easier to learn and use than traditional compiled languages. Scripting languages tend to be extensible to handle tasks that weren’t initially conceived by their developers. They can readily tie together tasks, such as preparing input for use by other programs, running those programs, and formatting the output. Another important characteristic of common scripting languages is that they tend to be cross-platform, with versions often available for UNIX, Windows, Macintosh, and other operating systems.
Among the more common uses of scripting languages is the production of Common Gateway Interface, or CGI, scripts. CGI scripts let Web browsers make use of programs running on a Web server.
Common scripting languages
Perl was invented by Larry Wall, a UNIX guru. The name is an acronym for Practical Extraction and Report Language. (It was humorously referred to in a definitive Perl textbook as Pathologically Eclectic Rubbish Lister.)
Perl is probably the most common language used for CGI scripts. Its syntax is similar to C. Variables used in Perl are not as strongly typed as in traditional languages; the type of a Perl variable is dependent on context. Perl is an excellent text manipulation language and is especially proficient at parsing delimited text files.
Versions are available for UNIX, 32-bit Windows platforms, and Mac. Perl applications process e-mail, create databases, and perform other complicated tasks. The language has object-oriented extensions, and there is a wealth of extant routines available for Perl.
For more information on Perl, visit these resources:
VBScript is a subset of Visual Basic specifically designed to be lean and mean enough for application in the Web-centric world. It’s engineered to be cross-platform and interacts with ActiveX Controls and Java Applets.
VBScript does not strongly type its variables; the interpreter recognizes the context of variables and deals with them appropriately. It is object-oriented, supporting a limited amount of Internet-related objects and any objects provided on a particular Web site.
For more information on VBScript, visit:
Tcl, or Tool Command Language, was developed by Dr. Jon Ousterhout at U.C.-Berkeley, and until recently, the language was developed and maintained by Sun Microsystems. Tcl grew out of Dr. Ousterhout’s needs while he was working on tools for designing integrated circuits. Dr. Ousterhout has now founded the Scriptics Corp., which basically spun off Sun and has now taken over the development and distribution of Tcl. Tcl is an open source language; extensions can be contributed by any member of the Tcl community.
Like other scripting languages, Tcl is extensible, portable, and easy to use. The Tcl interpreter is mainly a collection of C language functions, making it especially easy to extend by writing new C functions. Tcl comes with Tk, a programming environment specifically geared to designing Graphical User Interfaces (GUIs) in the X Windows environment and other graphical environments, such as Mac and all versions of Windows.
REXX, or Restructured Extended Executor, was developed by Michael Cowlishaw of IBM U.K. Laboratories for users of large mainframe systems. The language was ported to OS/2 when that environment was developed; OS/2 now is the primary platform for REXX. REXX originally was developed as a procedural language, but it was also designed for incorporation by other languages as a macro language. As in the other languages we have discussed, its variable types are recognized by context rather than by declaration, and it’s highly portable. IBM has now developed an object-oriented version of REXX known as Object REXX.
For more information on REXX, see:
Many other scripting languages are available today. All these languages have a lot to offer, and your background will certainly help you choose the one best suited for your task.
Subscribe to the Developer Insider Newsletter
From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays