Perl is already installed on the Unix machine used for this class. On this machine there is no Integrated Development Environment(IDE) just for developing and running Perl programs, but it's fairly easy to do anyway.
Perl programs are not compiled to machine code. Instead to execute a perl program, you run the perl interpreter, named perl. You will need to use an editor to write the perl program. If you are not already familiar with the editors available on our Unix machine, I recommend you use pico. First connect to hawk using telnet or other terminal emulation software. Then just type pico at the command prompt:
You should get a display something like this:
The line says New Buffer, meaning you are ready to create a new file. Enter text of your perl program. For example, here is a "Hello, World!" program. The first line is a comment consisting of the "bang" (the exclamation character, !) followed by the full path to the perl interpreter program. The status line above now shows that the buffer contents are Modified.:
The commands to save your program, name the file, etc, are mostly control key plus some letter, as shown at the bottom of the screen so you don't have to remember the commands, just where to look. For example, ^O (ctrl-O) is the command to write-out, that is, save your file. It will prompt for a file name. To exit pico, use ^X. I saved the file as hello.plx.
To run hello.plx, just type perl hello.plx at the command prompt. You can also just type hello.plx. This is because the Unix shell will read the comment line and automatically invoke the perl interpreter for you. (The path has to be correct location for the interpreter - /usr/bin/perl - in this case.) However, to get the second way to work, you must change the permissions on the file, hello.plx, to allow eXecution by using the unix chmod command:
hawk% chmod +x hello.plx