Your First Program

To write your Perl programs, you need a utility called a text editor. A text editor is a program that allows you to enter plain text, without any formatting, into a file. Microsoft Windows Notepad and the MS-DOS EDIT.EXE program are both examples of text editors. For Unix, vi, Emacs, and pico are all text editors. At least one of them will be available on your system.

Under the Mac, the MacPerl application contains a rudimentary text editor; to open a new program, select New under the File menu. For Mac OS X use the TextEdit program. This is located in the Finder under Applications. Be sure to set the preferences to “plain text” or select “Make Plain Text” under the Format menu.

You should not use a word processor to type in ...

Get SAMS Teach Yourself Perl in 24 Hours THIRD EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.