CHAPTER 3Scalars: Integers, Floating-Point Numbers, and Strings

A scalar is a single atomic value, and the most basic of Perl's data types. Scalars in turn are divided into four distinct kinds: integers, floating-point numbers, strings, and references, which are pointers to values stored elsewhere. Of these, the first three are what we might call "normal" scalar values.

In Chapter 2, we introduced integers, floating-point numbers, and strings. In this chapter, we will focus on a detailed look at how Perl handles scalar numbers and strings, and the most important of the built-in operators and functions that Perl provides to manipulate them. If Perl has a specialty, it is probably string manipulation, and accordingly the end of the chapter is ...

Get Pro Perl 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.