- 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.
- 實戰Java程序設計
- SEO實戰密碼
- 重學Java設計模式
- Jupyter數據科學實戰
- .NET Standard 2.0 Cookbook
- Building Serverless Web Applications
- 移動增值應用開發技術導論
- Serverless Web Applications with React and Firebase
- JavaScript+jQuery網頁特效設計任務驅動教程
- Python函數式編程(第2版)
- 從零開始學Selenium自動化測試:基于Python:視頻教學版
- 從零學Java設計模式
- 計算機常用算法與程序設計教程(第2版)
- IBM DB2 9.7 Advanced Application Developer Cookbook
- Visual C++ 開發從入門到精通