# Why is ldiv! not updating the first argument when it is written in permutated format?

**URL:** <https://discourse.julialang.org/t/why-is-ldiv-not-updating-the-first-argument-when-it-is-written-in-permutated-format/93230>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 19, 2023, 8:15pm UTC](https://discourse.julialang.org/t/why-is-ldiv-not-updating-the-first-argument-when-it-is-written-in-permutated-format/93230 "2023-01-19T20:15:42Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![mikmoore](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mikmoore/32/31109_2.png) [@mikmoore](https://discourse.julialang.org/u/mikmoore)\
**Post date:** [January 23, 2023, 6:23pm UTC](https://discourse.julialang.org/t/why-is-ldiv-not-updating-the-first-argument-when-it-is-written-in-permutated-format/93230/22 "2023-01-23T18:23:33Z")

</div>

I’ll reiterate that you should absolutely just use

```julia
a = view(s,[1,3])
a .= [100,200]

```

But if you insist on using an array of `Ref` then you can write

```julia
a = [Ref(s,1),Ref(s,3)]
setindex!.(a,[100,200])

```

PLEASE DO NOT DO THIS. The syntax is awful because this is not how you should do this.

---

<div class="post-metadata">

**Author:** ![Amro](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Amro](https://discourse.julialang.org/u/Amro)\
**Post date:** [January 23, 2023, 11:00pm UTC](https://discourse.julialang.org/t/why-is-ldiv-not-updating-the-first-argument-when-it-is-written-in-permutated-format/93230/23 "2023-01-23T23:00:35Z")

</div>

Yes, I just wanted to get the concept. I may share here my updated MWE for some recommendations.  
Many thanks again for your great support.

[Previous page](https://discourse.julialang.org/t/why-is-ldiv-not-updating-the-first-argument-when-it-is-written-in-permutated-format/93230.md?page=1)
