Tinkering with Perl

(Search & Sitemap) > Writing > Miscellaneous Nonfiction > Tinkering with Perl
Skip Back  Previous  1  2  3  4  5  6  7  8  9  10  Next  Skip Forward
Printer-Friendly Version

Most books you will find on Perl or any other programming language, are books intended to be a one-size-fits-all -- or, at least, that's how they're advertised. This book does not attempt or pretend to be appropriate to most users; instead, I am trying to do one thing well.

Well, what am I trying to do? Let me first tell what I am not trying to do:

Well, if I am not trying to do all of that, then what am I trying todo?

I wrote this because trying to do this: create a book that would help my brothers learn to tinker.

I first tried to start my brothers straight off with Java. And Java is a ood language -- it might have been better for them to know than Perl, and I think it would be a good second language to teach, when they are ready to mature, so that they can produce high quality software. But to learn all of those principles all at once is a heavy load, and one which can be confusing. I was telling them very good things, but I was boring them.

Then I began to think about how I first began to program. I first began to tinker in middle school with BASIC, on Apple ][ series computers. I wrote spaghetti code laced with gotos and all sorts of other things I would shudder to do now. I did not then learn to be a good programmer -- at all. But I did learn to be a tinkerer, to play around and explore and put things together. It has been said that education is not the filling of a pail, but the lighting of a fire. That experience lit my fire; it started the curiosity and enjoyment that later caused me to become a more serious programmer.

This book is not an attempt to immediately achieve the end result of a good programmer. It has a goal which might be called more modest, but which might be called much more ambitious: lighting a fire. Once the fire is lit, it can be tended and carefully pruned; there will be plenty of time for the channeling and discipline necessary to let the fire achieve truly great things. I am not trying to do everything; I am trying, for now, to do just one thing. And do it reasonably well.

Table of Contents

Chapter Zero: Preliminaries
        Unix preliminaries
                Directories
                        pwd
                        cd
                        mkdir
                        ls
                Files
                        Editors
                                joe
                        Shebang
                        Permissions
                                chmod
                        Running your programs

Chapter One: Fundamentals
        Comments
        Variables
                Scalars
                Lists
                Hashes
        Statements
                Assignment of variables
                        Assignment of scalars
                                Arithmetic
                        Assignment of lists
                        Assignment of hashes
                Input and output
                        Input
                        Output
        Flow control
                Blocks
                Conditional clauses
                If-then
                        If-then-else
                                If-then-else chains
                Loops
                        Foreach loops
                        While loops
                                For loops
        Subroutines and functions
                Arguments
                Subroutines
                Functions

Chapter two: Sample programs
        Friends and pets
        Running average

Chapter three: Debugging
        Common types of bugs
                Syntax errors
                        Misspelling
                        Forgotten semicolon
                        Single and double equals signs
        Scientific debugging

Conclusion

Glossary

Tinkering with Perl is a free book that provides an introduction to programming in Perl, as well as a basic reference for things like foreach in Perl, if-then, and if-then-else, in addition to providing a glossary where you can find definitions for concatenate and other terms.

Tinkering with Perl may be one of the most popular offerings on this site, but it's not the only attraction. You can read a tongue-in-cheek Game Review: Meatspace, read an even more offbeat customer service survey (whether or not you actually fill it out), and spend a few minutes wishing your boss would read, The Administrator Who Cried, "Important!" (Not to mention that there are other things you can read here besides tech stuff, from Janra Ball: The Headache to The Spectacles.)

Read more...

Top

(Search & Sitemap) > Writing > Miscellaneous Nonfiction > Tinkering with Perl
Skip Back  Previous  1  2  3  4  5  6  7  8  9  10  Next  Skip Forward
Printer-Friendly Version