Nicholas Clark wrote:
There's just been a long thread about this on p5p.
I think that "not really" is the current answer, and it's proved impossible
to cleanly write down what the order of evaluation is.
In the above line, they evaluate right to left, because the RHS of the
assignment is being evaluated first:
(snip)
Fun and games about evaluation order appeared with assigning to hash slices
and array slices (for example)

For simple assignments though, isn't it a necessity that it has to go RTL?


  $a = 1;
  $b = 2;
  $c = 3;
  $a = $b = $c;

This sets $a to 3. If evaluation didn't go RTL, $a would be set to 2.

(mmm. there is something wrong here. At this rate, we'll outdo Israel.pm
on the number of perl related messages)

Quick, let's move this discussion over to their list ;)


--
Robin Berjon <[EMAIL PROTECTED]>
Research Scientist, Expway      http://expway.com/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488




Reply via email to