O'Reilly logo

Sams Teach Yourself Perl in 21 Days, Second Edition by Rafe Colburn, Laura Lemay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required