- 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.
- Mastering JavaScript Functional Programming
- Mastering AWS Lambda
- Magento 2 Theme Design(Second Edition)
- Clojure Reactive Programming
- Learning Unity 2D Game Development by Example
- PHP 7+MySQL 8動(dòng)態(tài)網(wǎng)站開發(fā)從入門到精通(視頻教學(xué)版)
- 大學(xué)計(jì)算機(jī)基礎(chǔ)實(shí)驗(yàn)指導(dǎo)
- MySQL從入門到精通(軟件開發(fā)視頻大講堂)
- Bootstrap 4 Cookbook
- C#程序設(shè)計(jì)教程(第3版)
- 快速入門與進(jìn)階:Creo 4·0全實(shí)例精講
- Microsoft 365 Certified Fundamentals MS-900 Exam Guide
- 從Excel到Python數(shù)據(jù)分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應(yīng)用
- 單片機(jī)原理及應(yīng)用技術(shù)
- C++ System Programming Cookbook