It's not a question of precedence, it's a question of operand evaluation order. For example, precedence dictates the multiplications will occur before the sum in 2*foo()+4*bar(), but it doesn't control the order in which foo() is called in relation to bar().
Operand evaluation order is not defined in either language. Although I'm pretty sure you'll always get the same result in Perl5, you shouldn't rely on it. As for C, it's known to vary between compilers, between platforms and/or due to optimizations. Despite your claim, your snippet is not representative of C.
Don't use and modify the same variable in the same statement.
In reply to Re: Autoincrement operator precedence difference between C and Perl
by ikegami
in thread Autoincrement operator precedence difference between C and Perl
by Mbk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |