in reply to Re^5: grep for hash?
in thread grep for hash?

it has the same right-to-left associativity as C's

Operator associativity is not related to operand evaluation order.

Perl even have a case where they differ. Exponentiation is right-associative, but its operands are evaluated from left to right.

it's stated in perlsyn that the assignment operator works "as in C"

Operand evaluation order is not defined in C, and different compilers use different orders. (Well, so I was told.)

but I don't think that it's a "ZOMGWTFBBQ no one knows what'll happen just don't do that

I agree. Especially since my $x = $x; relies on it.

Replies are listed 'Best First'.
Re^7: grep for hash?
by Fletch (Bishop) on Jul 07, 2009 at 16:54 UTC

    That's one I didn't know; a new corner case to file away.

    $ perl -le 'print +(do{ print STDERR "ORLY?"; 2})**(do{ print STDERR " +YARLY!"; 3})' ORLY? YARLY! 8

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.