Next: Variables
Up: CGI Scripts with Perl

Basics

A Perl program is an ASCII text file. To run it, you load it into the Perl interpreter. Thus if your program were name "testprog" you would run it via the command perl testprog.

Under Unix, you can can have this happen automatically by making

#!/usr/local/bin/perl

the first line of your program, and changing the attributes the program file to include 'executable'.

Thus, a typical 'hello world' program looks like:

#! /usr/bin/perl

print "hello world \n";

Things to note:


Next: Variables
Up: CGI Scripts with Perl

[HOME] The Geometry Center Home Page

Comments to: webmaster@www.geom.uiuc.edu
Created: May 07 1996 --- Last modified: May 29 1996