home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book Home Programming PerlSearch this book

0.7. Conventions Used in This Book

Some of our conventions get larger sections of their very own. Coding conventions are discussed in Section 0.3, "Programming with Style" in Chapter 24, "Common Practices". In a sense, our lexical conventions are given in the Glossary (our lexicon).

The following typographic conventions are used in this book:

Italic

is used for URLs, manpages, pathnames, and programs. New terms are also italicized when they first appear in the text. Many of these terms will have alternative definitions in the Glossary if the one in the text doesn't do it for you.

Constant width

is used in examples and in regular text to show any literal code. Data values are represented by constant width in quotes (""), which are not part of the value.

Constant width bold

is used for command-line switches. This allows one to distinguish for example, between the -w warnings switch and the -w filetest operator. It is also used in the examples to indicate the text you type in literally.

Constant width italic

is used for generic code terms for which you must substitute particular values.

We give lots of examples, most of which are pieces of code that should go into a larger program. Some examples are complete programs, which you can recognize because they begin with a #! line. We start nearly all of our longer programs with:

#!/usr/bin/perl
Still other examples are things to be typed on a command line. We've used % to indicate a generic shell prompt:
% perl -e 'print "Hello, world.\n"'
Hello, world.
This style is representative of a standard Unix command line, where single quotes represent the "most quoted" form. Quoting and wildcard conventions on other systems vary. For example, many command-line interpreters under MS-DOS and VMS require double quotes instead of single quotes when you need to group arguments with spaces or wildcards in them.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.