in reply to Re^3: Puzzling $| behavior
in thread Puzzling $| behavior
i think it's matter of the compiler optimizer:
if i have something like f($x+=2, $x+=3); (and comma between arguments is not a sync point, like in C) then the optimizer could collapse $x+=2 and $x+=3 to $x+=5. It's not only matter of order.
if i have something like f($x+=2, $x+=3); (and comma between arguments is not a sync point, like in C) then the optimizer could collapse $x+=2 and $x+=3 to $x+=5. It's not only matter of order.
Oha$_ = 1; f($_+=2, $_+=3); sub f { print shift, ", ", shift, "\n"; } print `perl -v`; __________ 6, 6 This is perl, v5.6.0 built for darwin ....
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Puzzling $| behavior
by ikegami (Patriarch) on Oct 08, 2007 at 16:58 UTC |
In Section
Seekers of Perl Wisdom