
| Contents |
||||||||||||||||||||||||
| [an error occurred while processing this directive] |
2.1.1 Single-quoted StringsString literals can be represented in primarily three ways in Perl. The first way is in single quotes. Single quotes can be used to make sure that nearly all special characters that might be interpreted differently are taken at "face value". If that concept is confusing to you, just think about single quoted strings as being, for the most part, "what you see is what you get". Consider the following single-quoted string:
'i\o'; # The string 'i\o' This represents a string consisting of the character `i', followed by `\', followed by `o'. However, it is probably easier just to think of the string as @string{i\o}. Some other languages require you think of strings not as single chunks of data, but as some aggregation of a set of characters. Perl does not work this way. A string is a simple, single unit that can be as long as you would like.(2)
Note in our example above that
|