Hi, Uri Guttman <uri <at> stemsystems.com> writes: > note the binding := which is not the same as =. binding is > similar to aliasing. in the above case it matches the names > and assigns the new values accordingly.
that makes sense. But consider: > >>>>> "IB" == Ingo Blechschmidt <iblech <at> web.de> writes: > IB> quoting http://dev.perl.org/perl6/synopsis/S06.html: > >> Pairs can be used as lvalues. The value of the pair is the > >> recipient of the assignment: > >> > >> (key => $var) = "value"; # Note: Simple assignment, no binding! Here, there's a simple assignment, no binding. Is this a typo then, and it should be read as C<< (key => $var) := "value" >>? If yes, everything's clear. If not, then consider: (key => $var) = "value"; # Example from S06 my $value = "value"; (key => $var) = $value; # RHS replaced by a variable, # should make not difference. my $pair = (key => 3); $pair = $value; # Former LHS (a Pair) replaced # by a Pair variable, should # make no difference, too... say $pair.value; # Will print "value"... --Ingo -- Linux, the choice of a GNU | Mathematicians practice absolute freedom. generation on a dual AMD- | -- Henry Adams Athlon! |