http://www.perlmonks.org?node_id=808580


in reply to Re^2: Append to file or create file depending on input filename.
in thread Append to file or create file depending on input filename.

This is a good point. I don't know how likely this behavior is to change in the future or between platforms, only that the rough rule of thumb is that evaluation happens left-to-right. However, as this mailing-list thread shows, that's a rule subject to many exceptions.

And, as you might have suspected, the discussion there seems to indicate that the order of evaluation is not well-defined, so perl simply does what it does.

  • Comment on Re^3: Append to file or create file depending on input filename.