- Perl 6 Deep Dive
- Andrew Shitov
- 186字
- 2021-07-03 00:05:47
Variable containers in Perl 6
There are three basic types of variable containers: scalars, arrays, and hashes. First, you will learn the basics of how to use them in code. Then, later in this chapter, in the Using built-in data types section, we will take a deeper look at the data types available in the language.
The structural type of the container is expressed by a special character called sigil. It always stands before the variable name and, in many cases, may be considered a part of it.
The name of the variable is an identifier. An identifier is a string of alphabetic characters, digits, underscore characters, and hyphens. The first character cannot be a digit or a hyphen. Alphanumeric characters are understood in the Unicode sense, so, together with hyphens, it is possible to create very expressive variable names. The identifiers are case-sensitive.
In the following sections, you will see examples of naming the variables. Notice that a variable is always preceded by a sigil, while bare identifiers may be function or class names, as we will see in other chapters of this book.
- Raspberry Pi for Python Programmers Cookbook(Second Edition)
- Mastering NetBeans
- Java應(yīng)用與實戰(zhàn)
- Python數(shù)據(jù)分析入門與實戰(zhàn)
- Learning PostgreSQL
- TensorFlow Lite移動端深度學(xué)習(xí)
- 精通API架構(gòu):設(shè)計、運維與演進(jìn)
- Raspberry Pi 2 Server Essentials
- Python Interviews
- Visual FoxPro 6.0程序設(shè)計
- Akka入門與實踐
- Learning D
- Web開發(fā)的平民英雄:PHP+MySQL
- C語言從入門到精通(第5版)
- 開源網(wǎng)絡(luò)地圖可視化:基于Leaflet的在線地圖開發(fā)