The Whole Shebang -
Strange programming terms from Unix

Interpret - There are two ways code can run. It can be compiled into an executable or interpreted line for line. This is called a script. Perl is an interpreted language.

Shebang - This is the "#!" at the starting line of many Unix programming languages that tells the operating system that the file is a interpreted script and not an compiled executable. Immediately following the shebang is the location of the program intended to be used as the interpreter. While the derivation of the term is muddy, it is generally recognized as being a slang for the words represented by the symbols, sharp and bang. # (as in C#) is a musical notation that is used because it begins with the same letters as shell, while ! (or bang) actually represents the location of the operating system or root directory. The interpreter location is then "tacked on" to the root directory so that the operating system can find the program used to interpret the script.

Magic line - This is the general term for the line printed to the browser to indicate the content coming from the program is a web page. It contains the words "Content-type", then the MIME-type of the content,and then two line feeds. The browser directive looks like this,

"Content-type: text/html\n\n"

but to have it work in a program you would need to make it interpreter-friendly by adding "print" at the start and a semi-colon at the end. The correct final line would look like this:

print "Content-type: text/html\n\n";

Now the most common question I get is why do you need two line feeds. You have two lines that you can use to issue browser directives. The first line must be the content type followed by a line feed. The second line can contain cookie directives that the browser will handle on the requester side.

Splat - This term is an old hacker name for the shift 8 because it looks like a bug that has hit your windshield and gone splat.

Hope this helps!

Return to Perl Help


[Our portfolio] [A history of Computers and Networks]
[Perl help] [ABAP help] [MySQL help]
[TCP/IP troubleshooting] [HTML help] [Feedback] [Humor]
Advertise on Golden Ink's Georgia Network


In Association with Amazon.com