in reply to Perl 6, differrence between ':=' and '='
From Synopsis 03:
my $x = 'Just Another'; my $y := $x; $y = 'Perl Hacker'; say $x; say $y;
The assignment operator = assigns the value of its right operand to the container which is its left operand. The binding operator := associates the container of its right operand to the name which is its left operand.
Think of it a bit like Perl 5 references without the reference or dereference operators.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl 6, difference between ':=' and '='
by DrWhy (Chaplain) on Aug 12, 2010 at 23:24 UTC | |
by chromatic (Archbishop) on Aug 13, 2010 at 04:12 UTC |