Elements of Programming with Perl

( 4 )

Overview

Teaches the basics of programming right along with the particulars of Perl syntax as well as good style and structure and maintainability of the code.

Many neophyte programmers now begin their careers by learning the metalanguage, Perl. But the books currently available on Perl assume their readers already understand the basics of writing and designing programs--when in fact they do not. The tutorial teaches programming right along with the particulars of Perl ...

See more details below
Paperback (New Edition)
$25.43
BN.com price
(Save 27%)$34.95 List Price
Other sellers (Paperback)
  • All (9) from $1.99   
  • New (4) from $20.16   
  • Used (5) from $1.99   
Sending request ...

Overview

Teaches the basics of programming right along with the particulars of Perl syntax as well as good style and structure and maintainability of the code.

Many neophyte programmers now begin their careers by learning the metalanguage, Perl. But the books currently available on Perl assume their readers already understand the basics of writing and designing programs--when in fact they do not. The tutorial teaches programming right along with the particulars of Perl syntax, as well as good style and structure and maintainability of the code.

Read More Show Less

Editorial Reviews

Booknews
Introduces the basic elements of computer programming using the context of the Perl language. Variables, loop control constructs, file input and output, regular expressions, references, nested data structures, string and list processing, modules, debugging, abstract data structures and object-oriented programming are covered. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Java Metroplex User Group
I found the writing to be extremely interesting. The book covers a broad spectrum of Perl topics.the reader will find himself well-versed in the breadth of Perl. It definitely delivers. If I was to start learning Perl now I would be delighted to make this my first Perl book. It is extremely well-written and informative.I give it my highest recommendation.
Nathan Torkington
Andrew Johnson's Elements of Programming with Perl is the best Perl book for neophytes that I've found. ... Make no bones about it, this book is good. Damn good... I'd hire a graduate of Elements of Programming with Perl.
The Perl Journal
Sam Hobbs
If you haven't yet read Johnson's Elements of Programming with Perl, read it now; if you have, read it again. ... Elements is an extremely ambitious (and very successful) book that not only introduces programming and its concepts using Perl but that introduces an orderly software design philosophy.
The Perl Journal
Ken Bandes
Johnson has a gift for notations and diagrams, and his depictions of variables, references, and scope are unusually clear and enlightening. . . . Again, Johnson finds an excellent notation, this time to explain regular expressions. And I am particularly grateful for the sections on modules and debugging, topics often overlooked in books for beginners.
The Perl Journal
Read More Show Less

Product Details

  • ISBN-13: 9781884777806
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 10/28/1999
  • Edition description: New Edition
  • Edition number: 1
  • Pages: 362
  • Sales rank: 1,019,569
  • Product dimensions: 7.42 (w) x 9.40 (h) x 0.74 (d)

Meet the Author

Johnson uses Perl for data manipulation and extraction, and for various Web-related tasks. He writes articles and book reviews for the Linux Journal and has been a regular contributor to the comp.lang.perl.misc newsgroup for the last two years.

Read More Show Less

Table of Contents


Part I Introductory Elements
1 Introduction
2 Writing Code
3 Writing Programs
Part II Essential Elements
4 Data: Types and Variables
5 Control Structures
6 IO and Files
7 Functions
8 References and Agregate Data Structures
9 Documentation
Part III Practical Elements
10 Regular Expressions
11 String Manipulation
12 List Manipulation
13 Debugging
14 Using Modules:
LWP modules (example)
Part IV Advanced Elements
15 Modular Programming
16 Abstract Data Structures
17 Algorithms and Data Structures
18 Objects and Classes
19 Binary Tree
Appendices
A Command line switches (Perl as a tool)
B Special variables
C Other resources (newgroups, books, web pages)
Index
Read More Show Less

Preface

The Norse God Odin had two ravens, Hugin and Munin (Thought and Memory). He would send them out each day to fly to the corners of the earth. At night, they would return and tell him all their secrets. Odin knew how to manage his resources. Thought and memory, cogitation and recall, processing and storage--as a programmer, these are the important resources you too must tame. This book aims to be your guide in this endeavor. By the time you finish this book, you should have the skills to manage your own Hugin and Munin. In other words, you will be able to write your own hugin Perl program to scour the web for interesting information, as well as a munin program to manage and query the database of information you collect.

There are a lot of books about Perl on the market today, and some of them I recommend highly. (See Appendix C, "Additional resources.") However, many authors of these other Perl books assume readers are already familiar with programming. Other authors take the side-effect approach, teaching readers the vocabulary and syntax of the language but offering few guidelines on how to use it effectively. I do not believe that the side-effect approach is an effective means of teaching programming.

This book instead presents the basic elements of programming using the context of the Perl language. I do not assume that you've programmed before, nor do I merely hammer you with syntax and function names. This book is designed to teach you both programming and Perl, from the basics to the more advanced skills you need to become an accomplished Perl programmer.

Audience

This book is intended for two types of readers: those approaching Perl as their first programminglanguage and those who may have learned programming off the cuff but now want a more thorough grounding in programming in general, and Perl in particular.

More people than ever are learning Perl. Undoubtedly, Perl's widespread use for Common Gateway Interface (CGI) and web-client programming contributes to its popularity. Some people need Perl skills for their jobs, while others just think Perl programming is cool. Whatever your motivation, you need to understand up front that this book is not about using Perl for web-related programming, although an example or two illustrates that application of Perl. Instead, this book is about learning how to program using Perl. Once you have that knowledge under your belt, you can apply it to a multitude of problem domains.

This book does not assume that you know what variables, arrays, and loops are, or that you've programmed before. However, familiarity with basic mathematical concepts and logic will certainly be helpful. Readers with no prior programming experience should, of course, begin at the beginning and work their way through the first nine chapters in order. Chapters 10 through 15 are largely independent and can be read in any order. Chapters 16 through 19 introduce advanced Perl concepts. Each of these chapters lays a foundation for the following chapter, so read these four chapters in order.

If you are already familiar with elementary Perl programming, you may want to read chapters 2 and 3, and then pick and choose chapters that tackle areas in which you wish to improve. For example, chapters 6, 10, and 11 cover different aspects of regular expressions and matching operators. Chapter 8 covers references.

If you are a competent programmer in another language, this book may still be useful in demonstrating Perl's way of doing things. However, the discussions may not be as concise as you'd like, and the content is not organized as a reference book.

Organization

The book is organized in four main parts, starting with things to consider before you begin programming, followed by the essential aspects of programming with Perl. The third section explores a few of the more practical and Perl-specific areas. Finally, the later chapters introduce more advanced concepts, such as abstract data structures and object oriented-programming using Perl.

Introductory elements

The three chapters in this section provide elementary information on programming and the Perl language. Chapters 2 and 3 also delve into the basics of program structure and design. In chapter 3, we work through two examples, providing a whirlwind tour of the Perl language in the process.

Essential elements

Chapters 4 through 9 cover the essential concepts and structures you need to learn to program effectively. Here you will find everything from variables to loop control constructs to file input and output to basic regular expressions to subroutines to references and nested data structures. When you finish this section of the book, you will have all the tools you need to build real-world applications.

Practical elements

Chapters 10 through 15 take you into areas more specific to the Perl language, exploiting some of Perl's unique and powerful strengths. Here we explore regular expressions in more detail, string and list processing, more input and output techniques, using modules, and the Perl debugger.

Advanced elements

Chapters 16 through 19 provide an introduction to more advanced programming techniques, including building modules and abstract data structures. You are also introduced to object-oriented programming features in Perl. Chapter 20 mentions a few areas not covered in this book and suggests references for further study.

Appendices

The four short appendices cover command-line switches, special Perl variables, additional resources for readers, and a brief explanation of binary, octal, and hexadecimal numeric representation. Following the appendices is a small glossary of technical terms used in this book.

Source code, solutions, and errata

The source code for many of the example programs and modules presented in this book may be obtained from Manning's website. Point your browser to http:// www.manning.com/Johnson for links to the online resources for the book, including source packages.

Many chapters have a small number of exercises at the end. There is no appendix of answers to these exercises. However, the web page mentioned above contains a link to a solutions page.

Finally, although we have strived to eliminate mistakes from the manuscript, some errors may have slipped through. The previously mentioned web page contains a link to an online errata listing corrections to errors discovered after the book was published. If you find any errors, please let us know so we can list them on the errata sheet and fix them in a later printing. The errata page lists an email address to which you can submit error reports.

Conventions

In this book, "Perl" (uppercase P) refers to the Perl programming language, while "perl" (lowercase p) refers to the perl compiler/interpreter or the perl distribution.

Filenames and URLs appear in italics. Code, program names, and any commands you might issue at the command line prompt appear in a fixed-width font. Some blocks of code are written using a form of literate programming (LP) syntax to break the code into smaller chunks for presentation (explained in chapters 3 and 9). In these cases, the real Perl code, or the pseudo-code, is in a plain fixed-width font, while the lines representing literate programming syntax are in an italic fixed-width font.

Many of the technical terms introduced in this book are defined in the glossary. When the terms first appear in the text, they are italicized.

You will also see the words foo and bar throughout this book. These are generic terms commonly used in syntax examples to represent the name of a variable or the contents of a string. They are used when the point of the example is not directly related to whatever is being called "foo." You might encounter these terms--and many similar "dummy" words, such as foobar, baz, qux, and quux--in publicly available articles and examples on programming...

Read More Show Less

Customer Reviews

Average Rating 3.5
( 4 )
Rating Distribution

5 Star

(2)

4 Star

(0)

3 Star

(0)

2 Star

(1)

1 Star

(1)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 4 Customer Reviews
  • Anonymous

    Posted August 15, 2000

    Poorly organized.

    The problem I have had using this book is poor organization and almost non-existent indexing. It purports to be an introduction for non-programmers but as someone who has been programming in other languages for several years I have to admit that many of the explanations were opaque. If you have perfect retention then this book may be for you, but often, when I found myself confronted with a term or concept and was not sure if it had been introduced previously, it was very difficult to go back and find the topic. As an example the concept of regular expressions is introduced without any definition and the whole time you are reading the part about pattern matching you feel in the dark about the nature of regular expressions (regex), as if it is assumed that you know a lot more about them than you do. A book that is organized in the way this one is extensive indexing because one part of a topic may be covered in the general heading section and another may be covered in, say, a description of an example program that is under a different heading. But we only find 4 pages of 3 column index and there is very little depth or cross referencing. If you have a strong background in unix, c,and perhaps Java then you may have a better time with it, but then you wouldn't need a book for novice programmers.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 6, 2000

    The Best Introductory Book on the Market

    'Elements of Programming with Perl' by Andrew Johnson is simply the best introductory Perl book on the market. It is patient in pace and rich in content. Concepts are introduced and explained in error free code. Diagrams are effectively utilized to reinforce understanding. Having read Larry Wall's 'Programming Perl' and Tom Christiansen's 'Learning Perl' I was already acquainted with the basic constructs of the language. However as Perl is my first programming language I lacked the skills necessary to write effective reusable programs. 'Elements of Programming with Perl' early on presented the process of program design, and reinforced good design practice through well-organized code examples presented throughout all of the topical chapters. Each chapter builds on & reinforces topics presented in previous chapters. I often found myself reading about a function I had been introduced to elsewhere, and upon following the book's example code finally discovering it's practical potency. As an example, prior to reading this book I had been capable of sorting lists of hostnames by domain only by inefficiently using a regular expression to copy the domain & pre-pend it to the beginning of the hostname. Then using the default 'sort' function followed by a loop to discard the pre-pended domain. Now I can tailor the sort function to serve my needs efficiently replacing that tangle of code with just three lines. The book is well written with few wasted words and unlike most other authors this one understands & makes an effort to teach users of Active State Perl on Windows platforms as well as those using MacPerl. There are no sections or examples exclusive to Unix. It is refreshing to work through and use examples that are not devoted to system administrative tasks. The chapter on module use demonstrates fetching web pages through code that retrieves stock quote and trade volume information and then graphically charts the data. How much more practical & timely can an example be? The author makes himself available online, responds to questions, patiently reviews code and politely makes suggestions. My tool bag now full, my understanding thorough I highly recommend this book.

    0 out of 3 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 12, 2000

    The Best Introductory Book on the Market

    'Elements of Programming with Perl' by Andrew Johnson is simply the best introductory Perl book on the market. It is patient in pace and rich in content. Concepts are introduced and explained in error free code. Diagrams are effectively utilized to reinforce understanding. Having read Larry Wall's 'Programming Perl' and Tom Christiansen's 'Learning Perl' I was already acquainted with the basic constructs of the language. However as Perl is my first programming language I lacked the skills necessary to write effective reusable programs. 'Elements of Programming with Perl' early on presented the process of program design, and reinforced good design practice through well-organized code examples presented throughout all of the topical chapters. Each chapter builds on & reinforces topics presented in previous chapters. I often found myself reading about a function I had been introduced to elsewhere, and upon following the book's example code finally discovering it's practical potency. As an example, prior to reading this book I had been capable of sorting lists of hostnames by domain only by inefficiently using a regular expression to copy the domain & pre-pend it to the beginning of the hostname. Then using the default 'sort' function followed by a loop to discard the pre-pended domain. Now I can tailor the sort function to serve my needs efficiently replacing that tangle of code with just three lines. The book is well written with few wasted words and unlike most other authors this one understands & makes an effort to teach users of Active State Perl on Windows platforms as well as those using MacPerl. There are no sections or examples exclusive to Unix. It is refreshing to work through and use examples that are not devoted to system administrative tasks. The chapter on module use demonstrates fetching web pages through code that retrieves stock quote and trade volume information and then graphically charts the data. How much more practical & timely can an example be? The author makes himself available online responds to questions, patiently reviews code and politely makes suggestions. My tool bag now full, my understanding thorough I highly recommend this book.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted April 2, 2012

    No text was provided for this review.

Sort by: Showing all of 4 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)