Computer Sciences Department logo

CS 368-3 (2012 Summer) — Notes for Beginners

If you are new to programming and/or running programs from the command line, there are some basic things you need to know:

CSL Accounts

For this course, you will need to write and run many Perl scripts as part of your homework assignments. There are a variety of ways that you can get access to a suitable machine:

Editing Code

In this class, you must be able to create, edit, and save to disk Perl and other files. Applications like Microsoft Word will not work for this purpose, because they add lots of extra, hidden stuff to the text that you see on screen. What you need is generally called a “text editor”, ideally one made for editing programming files like Perl. Here are some options and further resources:

Using the Command Line

Typically in Windows, Mac OS X, and even Linux, users interact with the computer and its programs using windows, menus, buttons, and other graphical interfaces. However, for the kind of programming that we are doing, we will be using the command line, a purely text-based way to run programs and view their output.

You will certainly need to use the command line for this course. On Mac OS X, use the Terminal application. On Windows, you could probably get by for the first half of the classes using the Windows command line, but I know nothing about it (it is different than the ones in Unix, Linux, and Mac OS X); it is best to get remote access to your instructional (Linux) account and use that.

Assuming you are new to the command line, you need to learn some basic concepts and commands. Here are a few resources that I have found that look helpful:

Perl on Windows

Although Perl is not officially supported on Windows in this course, people have successfully completed the course using Windows in the past. So it should be fine, but I cannot help you (much) if you get stuck.

I used to recommend ActiveState Perl to Windows users, but then a student wrote the following:

Firstly, I’ve found that ActivePerl doesn’t install correctly on my machine. After searching all over the FAQs and whatnot I still can’t figure out why; all I know is that the command prompt doesn’t recognize the terms “perl” or “perldoc” when I use ActivePerl. However, I found that Strawberry Perl works wonderfully. I can execute Perl stuff from my command prompt with no problem. I used the exercises in the [Learning Perl] book chapter 1 to test it out.
Second, I had been using Notepad to create/edit Perl script, and it works just fine; however, if you want to have the nice color-coding that Tim talked about in class, I’ve found that Notepad++ is perfect. I use that now.
Both of those programs are open-source and seem to have large online communities that can help answer any questions. Also, perl.org is a great resource.