Hour 2. Perl's Building Blocks: Numbers and Strings
Every programming language—and every human language—has a similar beginning: You have to have something to talk about. In Perl, numbers and strings are the basic unit of conversation, and these are called scalars.
Scalars are Perl's basic unit of conversation. Every hour in this book deals with scalars—increasing, decreasing, querying, testing, collecting, clearing, separating, folding, sorting, saving, loading, printing, and deleting them. Scalars are Perl's singular nouns; they can represent a word, a record, a document, a line of text, or a character.
Scalars in Perl can represent literal data, which does not change over the life of the program. Some programming languages call these values ...
Get Sams Teach Yourself Perl in 24 Hours now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.