Perl for Beginners by Geoffrey Sampson

perl-beginnersPerl is a general-purpose programming language, but it has outstanding strengths in processing text files: often one can easily achieve in a line or two of Perl code some text-processing task that might take half a page of C or Java. In consequence, Perl is heavily used for computer-Centre system admin and for Web development – Web pages are HTML text files.  Another factor in the popularity of Perl is simply that many programmers find it fun to work with. Compared with Perl, other leading languages can feel worthy but tedious. Perl is a language in which it is easy to get started, but – because it offers handy ways to do very many different things – it takes a long time before anyone finishes learning Perl (if they do ever finish). One standard reference, Steven Holzner’s Perl Black Book (second edn, Paraglyph Press, 2001) is about 1300 dense pages long. So, for the beginner, it is important to focus on the core of the language, and avoid being distracted by all the other features which are there, but are not essential in the early stages. This book helps the reader to do that. It covers everything he or she needs to know in order to write successful Perl programs and grow in confidence with the language, while shielding him or her from confusing inessentials. 1 Later chapter contains pointers towards various topics which have deliberately been omitted here. When the core of the language has been thoroughly mastered, that will be soon enough to begin broadening one’s knowledge. Many productive Perl programmers have gaps in their awareness of the full range of language features.

 

This book is intended for beginners: readers who are new to Perl, and probably new to computer programming. The book takes care to spell out concepts that would be very familiar to anyone who already has experience of programming in some other language. In this book the readers will read Data types, Operators, Number and string operators, combining operator and assignment, Truth value operators, Flow of control: branches, Program layout, Built-in functions, Flow of control: loops, Reading from a file, Pattern matching, Matching and substitution, Character classes, Complement classes and indefinite repetition, Capturing sub patterns, Alternatives, Escaping special characters, Greed versus anorexia, Pattern-internal back-reference, Transliteration, Writing to a file, Reading, writing, appending, Pattern-matching modifier letters, Generalizing special cases, Arrays, Tables with numbered cells, An example, Assigning a list to an array, Adding elements to and removing them from arrays, Other operations on arrays, Scalar versus list context, Two-dimensional tables, User-defined functions, Adapting Perl to our own tasks, The structure of a user-defined function, A second example, Multi-argument functions, Divide and conquer, Returning a list of values, Subroutines and functions, Hash tables, Tables indexed by strings, Creating a hash, Working through a hash table, Advantages of hash tables, Hashes versus references to hashes, Formatted printing, Built-in variables, The debugger, Beyond the introduction and much more.

To download this book, please click the link below:
Click here to download Perl for Beginners by Geoffrey Sampson

Leave A Reply

Your email address will not be published.