
| Contents |
||||||||||||||||||||||||||||||||||||
| [an error occurred while processing this directive] |
2. Working with ScalarsScalar data are the most basic in Perl. Each scalar datum is logically a single entity. Scalars can be strings of characters or numbers. In Perl, you write literal scalar strings like this:
For example, the strings
Strings are always enclosed in some sort of quoting, the most common of
which are single quotes, Numbers are always written without quotes. Any numeric sequence without quotes are scalar number data. In this chapter, we will take a look at the variety of scalar data available in Perl, the way to store them in variables, how to operate on them, and how to output them.
|