- 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.
- Python 深度學習
- 跟老齊學Python:輕松入門
- Java FX應用開發教程
- Wireshark Network Security
- Quarkus實踐指南:構建新一代的Kubernetes原生Java微服務
- D3.js 4.x Data Visualization(Third Edition)
- Getting Started with Laravel 4
- Visual C++開發入行真功夫
- 編程菜鳥學Python數據分析
- C/C++程序員面試指南
- Learning Hadoop 2
- INSTANT Silverlight 5 Animation
- Exploring SE for Android
- Advanced Python Programming
- R的極客理想:量化投資篇