Camelia
Prev: Meta Operators

Assignment Operators

We are used to the shortcut opertators from many languages. They change the value that would have not been changed by merely participating in an operation.

examples/arrays/assignment_shortcut.p6
#!/usr/bin/env perl6
use v6;

my $num = 23;
say $num + 19;     # 42
say $num;          # 23

$num += 19;
say $num;          # 42


Prev: Meta Operators

Table of Contents

Comments

In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
comments powered by Disqus

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: