in reply to Matching and order of evaluation

BTW: Even this is save in Perl: ($a, $b) = ($b, $a)

Search, Ask, Know

Replies are listed 'Best First'.
Re: Re: Matching and order of evaluation
by diotalevi (Canon) on Oct 28, 2003 at 22:28 UTC
    Oh yes, right. Perl even goes to special accomodation to handle that. The issue only really comes up when computing something (like the lookups to find the LHS lvalues, or some component in an expression) is going to affect home something else comes out. The really, really common example is what happens when you run `sub ... { my ($arg, ...) = (shift, shift, shift ... )` or `shift -> ( shift ...`.