Summary

In this hour, you learned that Perl's most basic type of data is a scalar. Scalars can consist of almost any kind of data. Scalar values can be represented by string or numeric literals. Numeric literals can have many different formats representing integers and floating-point numbers. String literals are sequences of characters surrounded by either double or single quotation marks. Scalar values are stored in scalar variables, which have a dollar sign $ in front of their names. Perl provides operators for performing string manipulation and basic arithmetic.

Get SAMS Teach Yourself Perl in 24 Hours THIRD EDITION 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.