Ebook Sample Content Preview:
Chapter 7: Writing and Editing
Text Editors
WARNING: Text editors are *not* the same as word processors; know the difference. A text editor such as NotePad won't put things in the file you can't see. Exception: sometimes another text editor may display a ^M wherever there was a carriage return in the file created by NotePad. This generally has no real effect, as long as you remember to always upload in ASCII. On the other hand, a word processor such as MS?Word or Word Perfect will put all sorts of strange stuff in the file. It's supposed to do that; they are special characters that don't display but are used to control the way a document looks on screen and on paper. These special characters will wreak havoc on a script. It's just not possible to create a properly functioning script with a word processor. Don't even think of using one.
There are plenty of free or inexpensive text editors available. If you don't like the ones that come with Windows, or whatever OS you're using, feel free to use something else.
My personal favorite is Unix program called emacs. It's found on virtually every Unix system. It's included with all Linux distributions. So is "vi", but I didn't learn that one. One of the coolest things about emacs is that it is capable of some basic HTML editing. Plus, it's great for writing computer code because it will "highlight" reserved words (used for commands, etc.) in different colors from the other text. Comments are highlighted in still another color. It checks for mismatched parentheses and "curly braces".
These functions help keep you from writing code that won't work. The reserved word "sub" that signals the beginning of a subroutine is highlighted, along with the name of the subroutine ? if the routine is written legally. Other clues like the presence or absence of bold text tell you when and where there is something seriously wrong with your code.
Bonus Advice: You don't have to take my advice, but you paid for it so here it is. I encourage you to consider installing the Linux operating system on a second hard drive, or even a separate computer. Unlike Windows, it will run very well on an older machine with a less?powerful processor. You'll get a nicely graphical user interface, access to tons of free software from a bunch of sites on the Web and it already comes with emacs and other great tools. You'll get a complete set of Perl files, so you can write, debug and test your scripts without any practical limitations.
- File Size:276 KB
- License: Resell Rights
- Category:Ebooks
- Tags:2008 Ebooks Resale Rights