Day 2. Working with Strings and Numbers (Scalar Data)

Scalar data is a fancy Perl term that means data consisting of a single thing. Numbers and strings are both forms of scalar data. In this chapter, you'll learn about scalar data, scalar variables, and various operators and functions that operate on scalar data. All these things are the basic building blocks that you will use in just about any Perl script you write.

Today's topics include

  • Using numbers and strings

  • Scalar variables: defining, using, and assigning values to them

  • Simple arithmetic

  • Comparisons and tests

Get Sams Teach Yourself Perl in 21 Days, Second 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.