In fact, you don't have to provide an extension at all, but it's good practice and helps you locate your Perl scripts easily later on.īack at the command prompt, change to the directory where you saved the Perl script. Save the file as to a location of your choice. Word processors store text along with special formatting codes that can confuse programming languages.Ĭreate a new text file and type the following exactly as shown: Just make sure you're not using a word processor like Microsoft Word or OpenOffice Writer. Notepad, TextEdit, Vi, Emacs, Textmate, Ultra Edit and many other text editors can handle the job. All you need to write Perl programs is a text editor.