- 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.
- Vue.js 2 and Bootstrap 4 Web Development
- JMeter 性能測試實戰(第2版)
- PowerCLI Cookbook
- iOS開發實戰:從零基礎到App Store上架
- Java Web開發技術教程
- Nexus規?;疭crum框架
- Angular開發入門與實戰
- Procedural Content Generation for C++ Game Development
- Kotlin開發教程(全2冊)
- 運維前線:一線運維專家的運維方法、技巧與實踐
- Scala編程實戰
- After Effects CC技術大全
- Software-Defined Networking with OpenFlow(Second Edition)
- 3ds Max 2018從入門到精通
- HTML5 WebSocket權威指南