- Perl 6 Deep Dive
- Andrew Shitov
- 110字
- 2021-07-03 00:05:56
Assignment operators
The = operator is an assignment operator. It is used to assign the value of its right-hand side operand to the variable on the left. In the simplest case, the operator is used like this:
my $a;
$a = 42;
The action is not limited to scalars only. Arrays, hashes, or instances of classes (we will talk about classes in Chapter 8, Object-Oriented Programming) work are also processed as expected.
my @a = <10 20 30>;
my @b = @a;
Here, the assignment operator is used twice, first to initialize the @a array, and then to assign its values to the second array, @b.
推薦閱讀
- 新一代通用視頻編碼H.266/VVC:原理、標準與實現
- 算法大爆炸:面試通關步步為營
- 面向STEM的Scratch創新課程
- Learn Scala Programming
- Java:Data Science Made Easy
- Mastering Apache Maven 3
- OpenGL Data Visualization Cookbook
- Linux Shell核心編程指南
- 基于SpringBoot實現:Java分布式中間件開發入門與實戰
- OpenMP核心技術指南
- Fastdata Processing with Spark
- 深度學習程序設計實戰
- Web前端開發技術:HTML、CSS、JavaScript
- 高效使用Greenplum:入門、進階與數據中臺
- 編程的原則:改善代碼質量的101個方法