Summary
In this chapter, we introduced Perl’s basic concepts. In the following chapters, 3 to 11, we will expand on all of these subjects in detail. The purpose of this chapter is to provide just enough information on each area that any of these chapters can be dipped into without recourse to the others. We started with the fundamentals of the language, values and variables, and passing through whitespace and comments, operators and functions, and expressions and statements. We then looked at Perl’s data types—scalars, arrays, hashes, filehandles, and the special undefined value, with a quick glance at references and typeglobs, and also considered the context in which Perl evaluates expressions. We examined some of the many special variables Perl provides and saw how Perl can expand variables into strings using variable interpolation. We then took a brief look at the very large subject of regular expressions, and saw the match, substitution, and transliteration operations in action.
After a look at Perl’s block constructs, including loops and conditional statements and expressions, we saw how to declare and use subroutines in Perl, then use modules, Perl’s implementation of libraries, to make use of subroutines and variables defined externally to our program script.
All well-written Perl programs make use of warnings and strict checking, both of which were briefly covered. Finally, armed with this information, we saw how to properly declare the variables that up until now we had simply used by writing them down.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2005 Peter Wainwright
About this chapter
Cite this chapter
(2005). Basic Concepts. In: Pro Perl. Apress. https://doi.org/10.1007/978-1-4302-0014-7_2
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0014-7_2
Publisher Name: Apress
Print ISBN: 978-1-59059-438-4
Online ISBN: 978-1-4302-0014-7
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books