in reply to Re: Bulk hash population order
in thread Bulk hash population order
Maybe it's good advice to say "never make assumptions about ordering wrt hashes", but in this case the advice is misleading, because the form
always* results in the hash %h containing foo => 2, regardless of what value (if any) $h{'foo'} had previously. Fletch's explanation is correct.%h = ( %h, foo => 2 );
* That is, unless %h is tied to other behavior, e.g. altering or deleting keys or values according to some function.
|
|---|